Skip to content

Commit

Permalink
Update to 0.3.0 using UnderStrap 0.6.0 as parent
Browse files Browse the repository at this point in the history
  • Loading branch information
holger1411 committed Apr 29, 2017
1 parent a6801fe commit 212bee6
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 12 deletions.
25 changes: 22 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ var rename = require('gulp-rename');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var merge2 = require('merge2');
var imagemin = require('gulp-imagemin');
var ignore = require('gulp-ignore');
var rimraf = require('gulp-rimraf');
var clone = require('gulp-clone');
var merge = require('gulp-merge');
var sourcemaps = require('gulp-sourcemaps');
var browserSync = require('browser-sync').create();
var del = require('del');
var cleanCSS = require('gulp-clean-css');

function swallowError(self, error) {
console.log(error.toString())
Expand Down Expand Up @@ -102,10 +104,19 @@ gulp.task('sass', function () {
// Starts watcher. Watcher runs gulp sass task on changes
gulp.task('watch', function () {
gulp.watch('./sass/**/*.scss', ['sass']);
gulp.watch('./css/child-theme.css', ['cssnano']);
gulp.watch('./css/child-theme.css', ['minify-css']);
gulp.watch([basePaths.dev + 'js/**/*.js','js/**/*.js','!js/child-theme.js','!js/child-theme.min.js'], ['scripts']);
});

// Run:
// gulp imagemin
// Running image optimizing task
gulp.task('imagemin', function(){
gulp.src('img/**')
.pipe(imagemin())
.pipe(gulp.dest('img'))
});

// Run:
// gulp nanocss
// Minifies CSS files
Expand All @@ -119,6 +130,14 @@ gulp.task('cssnano', ['cleancss'], function(){
.pipe(gulp.dest('./css/'));
});

gulp.task('minify-css', function() {
return gulp.src('./css/theme.css')
.pipe(cleanCSS({compatibility: 'ie8'}))
.pipe(plumber())
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('./css/'));
});

gulp.task('cleancss', function() {
return gulp.src('./css/*.min.css', { read: false }) // much faster
.pipe(ignore('theme.css'))
Expand All @@ -135,7 +154,7 @@ gulp.task('browser-sync', function() {
// Run:
// gulp watch-bs
// Starts watcher with browser-sync. Browser-sync reloads page automatically on your browser
gulp.task('watch-bs', ['browser-sync', 'watch', 'cssnano'], function () { });
gulp.task('watch-bs', ['browser-sync', 'watch', 'minify-css'], function () { });

// Run:
// gulp scripts.
Expand Down Expand Up @@ -235,7 +254,7 @@ gulp.task('clean-dist', function () {
// gulp dist-product
// Copies the files to the /dist folder for distributon
gulp.task('dist-product', ['clean-dist-product'], function() {
gulp.src(['**/*','!bower_components','!bower_components/**','!node_modules','!node_modules/**','!src','!src/**','!dist','!dist/**', '*'])
gulp.src(['**/*','!bower_components','!bower_components/**','!node_modules','!node_modules/**','!dist','!dist/**', '*'])
.pipe(gulp.dest('dist-product/'))
});

Expand Down
6 changes: 3 additions & 3 deletions js/child-theme.min.js

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "understrap-child",
"version": "0.2.2",
"version": "0.3.0",
"description": "Basic Child Theme for UnderStrap Theme Framework: https://github.com/holger1411/understrap",
"main": "index.js",
"scripts": {
Expand All @@ -26,26 +26,28 @@
"homepage": "https://understrap.com",
"dependencies": {
"bootstrap": "^4.0.0-alpha.6",
"browser-sync": "^2.18.7",
"browser-sync": "^2.18.8",
"del": "^2.2.2",
"font-awesome": "^4.7.0",
"gulp": "^3.9.1",
"gulp-clone": "^1.0.0",
"gulp-concat": "^2.6.1",
"gulp-cssnano": "^2.1.2",
"gulp-ignore": "^2.0.2",
"gulp-imagemin": "^3.2.0",
"gulp-merge": "^0.1.1",
"gulp-plumber": "^1.1.0",
"gulp-rename": "^1.2.2",
"gulp-rimraf": "^0.2.1",
"gulp-sass": "^3.1.0",
"gulp-sourcemaps": "^2.4.1",
"gulp-uglify": "^2.0.1",
"gulp-sourcemaps": "2.4.1",
"gulp-uglify": "^2.1.2",
"gulp-watch": "^4.3.11",
"merge2": "^1.0.3",
"run-sequence": "^1.2.2",
"gulp-clean-css": "^3.0.4",
"undescores-for-npm": "^1.0.0",
"understrap": "^0.5.7"
"understrap": "^0.6.0"
}

}
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Author: Holger Koenemann
Author URI: http://www.holgerkoenemann.de
Template: understrap
Version: 0.2.2
Version: 0.3.0
License: Commercial
Text Domain: understrap-child
Tags: one-column, custom-menu, featured-images, theme-options, translation-ready
Expand Down

0 comments on commit 212bee6

Please sign in to comment.