This repository has been archived by the owner on Apr 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(gulpfile.js): improve initial startup time (#276)
* build(gulpfile.js): lazy-load packages to improve initial loading times * build(webpack): add hard source plugin * build(webpack): update console view config * build(gulpfile.js): replace deprecated gulp-util package * build(package.json): update minimum engine requirement to node 8 * ci(travis): update minimum engine requirement to node 8 BREAKING CHANGE: The minimum engine requirement is now Node >= 8.
- Loading branch information
Doğa Gürdal
committed
Jul 16, 2018
1 parent
886c94e
commit a98dd11
Showing
19 changed files
with
328 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
const browserSync = require('browser-sync') | ||
const gulp = require('gulp') | ||
|
||
module.exports = function (config) { | ||
gulp.task('browserSync', function () { | ||
const browserSync = require('browser-sync') | ||
return browserSync.init(config.browserSync) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
const gulp = require('gulp') | ||
const changed = require('gulp-changed') | ||
const browserSync = require('browser-sync') | ||
const handleErrors = require('../utils/handleErrors') | ||
|
||
module.exports = function (config) { | ||
gulp.task('copy', function () { | ||
return gulp.src(config.copy) | ||
const changed = require('gulp-changed') | ||
const handleErrors = require('../utils/handleErrors') | ||
let task = gulp.src(config.copy) | ||
.pipe(changed(config.dest)) | ||
.pipe(gulp.dest(config.dest)) | ||
.on('error', handleErrors) | ||
.pipe(browserSync.stream()) | ||
if (global.watchMode) { | ||
const browserSync = require('browser-sync') | ||
task = task.pipe(browserSync.stream()) | ||
} | ||
return task | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.