diff --git a/gulpfile.js b/gulpfile.js index b3b2747..07025ea 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -252,17 +252,17 @@ gulp.task( 'copy-assets', function() { // Deleting the files distributed by the copy-assets task gulp.task( 'clean-vendor-assets', function() { - return del( [paths.dev+'/js/bootstrap4/**', paths.dev+'/sass/bootstrap4/**', './fonts/*wesome*.{ttf,woff,woff2,eot,svg}', paths.dev+'/sass/fontawesome/**', paths.dev+'/sass/underscores/**', paths.dev+'/js/skip-link-focus-fix.js', paths.js+'/**/skip-link-focus-fix.js', paths.js+'/**/popper.min.js', paths.js+'/**/popper.js', ( paths.vendor!==''?( paths.js+paths.vendor+'/**' ):'' )]); + return del( [paths.dev + '/js/bootstrap4/**', paths.dev + '/sass/bootstrap4/**', './fonts/*wesome*.{ttf,woff,woff2,eot,svg}', paths.dev + '/sass/fontawesome/**', paths.dev + '/sass/underscores/**', paths.dev + '/js/skip-link-focus-fix.js', paths.js + '/**/skip-link-focus-fix.js', paths.js + '/**/popper.min.js', paths.js + '/**/popper.js', ( paths.vendor!==''?( paths.js + paths.vendor + '/**' ):'' )]); }); // Run // gulp dist // Copies the files to the /dist folder for distribution as simple theme gulp.task( 'dist', ['clean-dist'], function() { - return gulp.src( ['**/*', '!'+paths.bower, '!'+paths.bower+'/**', '!'+paths.node, '!'+paths.node+'/**', '!'+paths.dev, '!'+paths.dev+'/**', '!'+paths.dist, '!'+paths.dist+'/**', '!'+paths.distprod, '!'+paths.distprod+'/**', '!'+paths.sass, '!'+paths.sass+'/**', '!readme.txt', '!readme.md', '!package.json', '!package-lock.json', '!gulpfile.js', '!gulpconfig.json', '!CHANGELOG.md', '!.travis.yml', '!jshintignore', '!codesniffer.ruleset.xml', '*'], { 'buffer': false } ) - .pipe( replace( '/js/jquery.slim.min.js', '/js'+paths.vendor+'/jquery.slim.min.js', { 'skipBinary': true } ) ) - .pipe( replace( '/js/popper.min.js', '/js'+paths.vendor+'/popper.min.js', { 'skipBinary': true } ) ) - .pipe( replace( '/js/skip-link-focus-fix.js', '/js'+paths.vendor+'/skip-link-focus-fix.js', { 'skipBinary': true } ) ) + return gulp.src( ['**/*', '!'+ paths.bower, '!'+ paths.bower +'/**', '!'+ paths.node, '!'+ paths.node + '/**', '!' + paths.dev, '!' + paths.dev +'/**', '!'+ paths.dist, '!'+ paths.dist +'/**', '!'+ paths.distprod, '!'+ paths.distprod +'/**', '!'+ paths.sass, '!'+ paths.sass +'/**', '!readme.txt', '!readme.md', '!package.json', '!package-lock.json', '!gulpfile.js', '!gulpconfig.json', '!CHANGELOG.md', '!.travis.yml', '!jshintignore', '!codesniffer.ruleset.xml', '*'], { 'buffer': false } ) + .pipe( replace( '/js/jquery.slim.min.js', '/js'+ paths.vendor +'/jquery.slim.min.js', { 'skipBinary': true } ) ) + .pipe( replace( '/js/popper.min.js', '/js'+ paths.vendor +'/popper.min.js', { 'skipBinary': true } ) ) + .pipe( replace( '/js/skip-link-focus-fix.js', '/js'+ paths.vendor +'/skip-link-focus-fix.js', { 'skipBinary': true } ) ) .pipe(gulp.dest( paths.dist ) ); }); @@ -275,7 +275,7 @@ gulp.task( 'clean-dist', function () { // gulp dist-product // Copies the files to the /dist-prod folder for distribution as theme with all assets gulp.task( 'dist-product', ['clean-dist-product'], function() { - return gulp.src( ['**/*', '!'+paths.bower, '!'+paths.bower+'/**', '!'+paths.node, '!'+paths.node+'/**', '!'+paths.dist, '!'+paths.dist+'/**', '!'+paths.distprod, '!'+paths.distprod+'/**', '*'] ) + return gulp.src( ['**/*', '!' + paths.bower, '!' + paths.bower + '/**', '!' + paths.node, '!' + paths.node +'/**', '!' + paths.dist, '!' + paths.dist +'/**', '!' + paths.distprod, '!' + paths.distprod + '/**', '*'] ) .pipe( gulp.dest( paths.distprod ) ); } );