@@ -21,26 +21,26 @@ gulp.task('es6', () =>
2121 filename : 'bundle.min.js' ,
2222 } ,
2323 } , webpack ) )
24- . pipe ( babel ( { presets : [ 'es2015' ] } ) ) // Transpile ES6+ into ES5
24+ . pipe ( babel ( { presets : [ 'es2015' ] } ) )
2525 . pipe ( uglify ( ) )
26- . pipe ( gulp . dest ( 'dist/js' ) ) // Copy to dist
26+ . pipe ( gulp . dest ( 'dist/js' ) )
2727) ;
2828
2929gulp . task ( 'html' , ( ) =>
30- gulp . src ( 'src/index.html' ) // Take index.html
30+ gulp . src ( 'src/index.html' )
3131 . pipe ( htmlReplace ( {
32- css : 'css/bundle.min.css' , // Replace the stylesheet links section with the link to the new styleshet
33- js : 'js/bundle.min.js' , // Replace the script links section with the link to the new script
32+ css : 'css/bundle.min.css' ,
33+ js : 'js/bundle.min.js' ,
3434 } ) )
35- . pipe ( gulp . dest ( 'dist' ) ) // Copy to dist
35+ . pipe ( gulp . dest ( 'dist' ) )
3636) ;
3737
3838gulp . task ( 'css' , ( ) =>
39- gulp . src ( 'src/css/styles .css' ) // Take CSS files
40- . pipe ( rename ( 'bundle.min.css' ) ) // Concat
39+ gulp . src ( 'src/css/app .css' )
40+ . pipe ( rename ( 'bundle.min.css' ) )
4141 . pipe ( postCSS ( [ postCSSImport ] ) )
42- . pipe ( cleanCSS ( ) ) // Minify
43- . pipe ( gulp . dest ( 'dist/css' ) ) // Copy to dist
42+ . pipe ( cleanCSS ( ) )
43+ . pipe ( gulp . dest ( 'dist/css' ) )
4444) ;
4545
4646gulp . task ( 'eslint' , ( ) =>
@@ -52,8 +52,8 @@ gulp.task('clean', () =>
5252) ;
5353
5454gulp . task ( 'browser-sync' , ( ) => {
55- browserSync . init ( [ 'dist/css/**.css' , 'dist/js/**.js' , 'dist/**.html' ] , { // Look for changes in dist directories
56- server : 'dist' , // Reload browser when any JS is modified or inject CSS when any stylesheet is modified
55+ browserSync . init ( [ 'dist/css/**.css' , 'dist/js/**.js' , 'dist/**.html' ] , {
56+ server : 'dist' ,
5757 } ) ;
5858} ) ;
5959
@@ -63,4 +63,4 @@ gulp.task('default', ['html', 'css', 'es6', 'browser-sync'], () => {
6363 gulp . watch ( 'src/*.html' , [ 'html' ] ) ;
6464} ) ;
6565
66- gulp . task ( 'build' , [ 'html' , 'css' , 'es6' , 'size' ] ) ;
66+ gulp . task ( 'build' , [ 'html' , 'css' , 'es6' ] ) ;
0 commit comments