This file contains hidden or 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
| $ gulp build | |
| gulp build | |
| [06:42:02] Using gulpfile ~/work/boilerplate/gulpfile.js | |
| [06:42:02] Starting 'build'... | |
| [06:42:02] Starting 'clean'... | |
| [06:42:02] Finished 'clean' after 12 ms | |
| [06:42:02] Starting 'copy-html'... | |
| [06:42:02] Starting 'browserify'... | |
| [06:42:02] Finished 'browserify' after 6.92 μs | |
| [06:42:02] Finished 'copy-html' after 9.83 ms |
This file contains hidden or 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
| $ npm install run-sequence --save-dev |
This file contains hidden or 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
| var sequence = require('run-sequence'); | |
| // ... | |
| gulp.task('build', function(callback) { | |
| sequence('clean', ['copy-html', 'browserify'], callback); | |
| }); | |
| // convert React components to be used in the browser | |
| gulp.task('browserify', function() { | |
| // nothing here for now | |
| }); |
This file contains hidden or 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
| var sequence = require('run-sequence'); | |
| // ... | |
| sequence('clean', ['copy-html', 'browserify'], callback); |
This file contains hidden or 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
| 'clean', ['copy-html', 'browserify'], callback |
This file contains hidden or 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
| $ gulp clean | |
| [06:15:30] Using gulpfile ~/work/boilerplate/gulpfile.js | |
| [06:15:30] Starting 'clean'... | |
| [06:15:30] Finished 'clean' after 18 ms |
This file contains hidden or 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
| $ npm install gulp-rimraf --save-dev |
This file contains hidden or 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
| var clean = require('gulp-rimraf'); | |
| // ... | |
| // Clean dist folder | |
| gulp.task('clean', function() { | |
| return gulp.src('./dist', { | |
| read: false | |
| }).pipe(clean({ | |
| force: true | |
| })); | |
| }); |
This file contains hidden or 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
| $ gulp server | |
| [06:28:16] Using gulpfile ~/work/boilerplate/gulpfile.js | |
| [06:28:16] Starting 'copy-html'... | |
| [06:28:16] Finished 'copy-html' after 16 ms | |
| [06:28:16] Starting 'server'... | |
| [06:28:16] Livereload started at http://localhost:35729 | |
| [06:28:16] Finished 'server' after 9.65 ms | |
| [06:28:16] Webserver started at http://localhost:8000 |
This file contains hidden or 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
| var gulp = require('gulp'); | |
| var server = require('gulp-server-livereload'); | |
| gulp.task('copy-html', function() { | |
| return gulp // note "return" keyword | |
| .src('./src/**/*.html') // copy everything, including subdirectories | |
| .pipe(gulp.dest('dist')); // to dist folder | |
| }); | |
| gulp.task('server', ['copy-html'], function() { |