Skip to content

Commit 1ee1924

Browse files
committed
0.2.3:
- Updated dependencies - Removed custom browserify error handler - Replaced deprecated gulp-util with fancy-log and ansi colors
1 parent 43587b1 commit 1ee1924

File tree

7 files changed

+23
-32
lines changed

7 files changed

+23
-32
lines changed

gulp/tasks/development/responsive-images.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ gulp.task('responsive-images', function() {
1414
.pipe(changed(config.dest))
1515

1616
.pipe(imageResize(config.options))
17-
.pipe(rename(function (path) { path.basename += config.outputSuffix; }))
17+
.pipe(rename(function(path) { path.basename += config.outputSuffix; }))
1818
.pipe(gulp.dest(config.dest));
1919
});

gulp/tasks/development/scripts-browserify.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@ var browsersync = require('browser-sync');
55
var browserify = require('browserify');
66
var source = require('vinyl-source-stream');
77
var watchify = require('watchify');
8+
var log = require('fancy-log');
89
var bundleLogger = require('../../util/bundleLogger');
9-
var handleErrors = require('../../util/handleErrors');
10+
11+
function onError(err) {
12+
log('\x1b[31m' + 'Browserify Error:', err.message, '\x1b[0m');
13+
// Keep gulp from hanging on this task
14+
this.emit('end');
15+
}
1016

1117

1218
// Run JavaScript through Browserify
@@ -36,7 +42,7 @@ gulp.task('scripts-browserify', function(callback) {
3642
return bundler
3743
.bundle()
3844
// Report compile errors
39-
.on('error', handleErrors)
45+
.on('error', onError)
4046
// Use vinyl-source-stream to make the
4147
// stream gulp compatible. Specifiy the
4248
// desired output filename here.

gulp/tasks/development/styles.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ var plumber = require('gulp-plumber');
1111
var sourcemaps = require('gulp-sourcemaps');
1212
var browsersync = require('browser-sync');
1313

14-
function onError (err) {
14+
function onError(err) {
1515
console.log(err);
16+
// Keep gulp from hanging on this task
1617
this.emit('end');
1718
}
1819

gulp/tasks/production/styles.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ var cssnano = require('cssnano');
1010
var plumber = require('gulp-plumber');
1111
var browsersync = require('browser-sync');
1212

13-
function onError (err) {
13+
function onError(err) {
1414
console.log(err);
15+
// Keep gulp from hanging on this task
1516
this.emit('end');
1617
}
1718

gulp/util/bundleLogger.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
1-
/* bundleLogger
2-
------------
3-
Provides gulp style logs to the bundle method in browserify.js
4-
*/
1+
// Provides gulp style logs to the bundle method in browserify.js
52

6-
var gutil = require('gulp-util');
3+
var log = require('fancy-log');
74
var prettyHrtime = require('pretty-hrtime');
85
var startTime;
96

7+
108
module.exports = {
119
start: function(filepath) {
1210
startTime = process.hrtime();
13-
gutil.log('Bundling', gutil.colors.green(filepath));
11+
log('Bundling\x1b[32m', filepath, '\x1b[0m');
1412
},
1513

1614
end: function(filepath) {
1715
var taskTime = process.hrtime(startTime);
1816
var prettyTime = prettyHrtime(taskTime);
19-
gutil.log('Bundled', gutil.colors.green(filepath), 'in', gutil.colors.magenta(prettyTime));
17+
log('Bundled\x1b[32m', filepath, '\x1b[0m' + 'after' + '\x1b[35m', prettyTime, '\x1b[0m');
2018
}
2119
};

gulp/util/handleErrors.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
{
22
"name": "gulp-jekyll",
3-
"version": "0.2.2",
3+
"version": "0.2.3",
44
"description": "The build process for gulp-jekyll",
55
"author": "Michael Xander",
66
"repository": "michaelx/gulp-jekyll",
77
"devDependencies": {
8-
"browser-sync": "^2.24.4",
8+
"browser-sync": "^2.24.6",
99
"browserify": "^16.2.2",
1010
"browserify-shim": "^3.8.14",
1111
"css-mqpacker": "^6.0.2",
1212
"cssnano": "^3.10.0",
1313
"del": "^3.0.0",
14+
"fancy-log": "^1.3.2",
1415
"gulp": "^3.9.1",
1516
"gulp-base64": "^0.1.3",
1617
"gulp-changed": "^3.2.0",
@@ -22,11 +23,10 @@
2223
"gulp-jshint": "^2.1.0",
2324
"gulp-jsonlint": "^1.2.1",
2425
"gulp-jsonminify": "^1.1.0",
25-
"gulp-notify": "^3.2.0",
2626
"gulp-plumber": "^1.2.0",
2727
"gulp-postcss": "^7.0.1",
2828
"gulp-pretty-data": "^0.1.2",
29-
"gulp-rename": "^1.3.0",
29+
"gulp-rename": "^1.4.0",
3030
"gulp-rev": "^8.1.1",
3131
"gulp-rev-collector": "^1.3.1",
3232
"gulp-rsync": "0.0.8",
@@ -39,7 +39,7 @@
3939
"jshint-stylish": "^2.2.1",
4040
"postcss-advanced-variables": "^2.3.3",
4141
"postcss-nested": "^3.0.0",
42-
"postcss-preset-env": "^5.2.0",
42+
"postcss-preset-env": "^5.2.3",
4343
"postcss-reporter": "^5.0.0",
4444
"postcss-uncss": "^0.14.0",
4545
"pretty-hrtime": "^1.0.3",

0 commit comments

Comments
 (0)