aaaaand more spaces
This commit is contained in:
parent
2e70aee8af
commit
8d0cec8804
78
gulpfile.js
78
gulpfile.js
|
@ -166,14 +166,14 @@ gulp.task( 'styles', function( callback ){ gulpSequence( 'sass', 'minifycss' )(
|
||||||
// gulp browser-sync
|
// gulp browser-sync
|
||||||
// Starts browser-sync task for starting the server.
|
// Starts browser-sync task for starting the server.
|
||||||
gulp.task( 'browser-sync', function() {
|
gulp.task( 'browser-sync', function() {
|
||||||
browserSync.init(cfg.browserSyncWatchFiles, cfg.browserSyncOptions);
|
browserSync.init( cfg.browserSyncWatchFiles, cfg.browserSyncOptions );
|
||||||
});
|
} );
|
||||||
|
|
||||||
|
|
||||||
// Run:
|
// Run:
|
||||||
// gulp watch-bs
|
// gulp watch-bs
|
||||||
// Starts watcher with browser-sync. Browser-sync reloads page automatically on your browser
|
// Starts watcher with browser-sync. Browser-sync reloads page automatically on your browser
|
||||||
gulp.task( 'watch-bs', ['browser-sync', 'watch', 'scripts'], function () { });
|
gulp.task( 'watch-bs', ['browser-sync', 'watch', 'scripts'], function () { } );
|
||||||
|
|
||||||
|
|
||||||
// Run:
|
// Run:
|
||||||
|
@ -189,19 +189,19 @@ gulp.task( 'scripts', function() {
|
||||||
|
|
||||||
paths.dev + '/js/skip-link-focus-fix.js'
|
paths.dev + '/js/skip-link-focus-fix.js'
|
||||||
];
|
];
|
||||||
gulp.src(scripts)
|
gulp.src( scripts )
|
||||||
.pipe(concat('theme.min.js'))
|
.pipe( concat( 'theme.min.js' ) )
|
||||||
.pipe(uglify())
|
.pipe( uglify() )
|
||||||
.pipe(gulp.dest(paths.js));
|
.pipe( gulp.dest(paths.js) );
|
||||||
|
|
||||||
gulp.src(scripts)
|
gulp.src( scripts )
|
||||||
.pipe(concat('theme.js'))
|
.pipe( concat( 'theme.js' ) )
|
||||||
.pipe(gulp.dest(paths.js));
|
.pipe( gulp.dest( paths.js ) );
|
||||||
});
|
});
|
||||||
|
|
||||||
// Deleting any file inside the /src folder
|
// Deleting any file inside the /src folder
|
||||||
gulp.task( 'clean-source', function () {
|
gulp.task( 'clean-source', function() {
|
||||||
return del(['src/**/*']);
|
return del( ['src/**/*'] );
|
||||||
});
|
});
|
||||||
|
|
||||||
// Run:
|
// Run:
|
||||||
|
@ -215,62 +215,62 @@ gulp.task( 'copy-assets', function() {
|
||||||
// Copy all JS files
|
// Copy all JS files
|
||||||
|
|
||||||
|
|
||||||
var stream = gulp.src(paths.node + 'bootstrap/dist/js/**/*.js')
|
var stream = gulp.src( paths.node + 'bootstrap/dist/js/**/*.js' )
|
||||||
.pipe(gulp.dest(paths.dev + '/js/bootstrap4'));
|
.pipe( gulp.dest( paths.dev + '/js/bootstrap4' ) );
|
||||||
// Copy all Bootstrap SCSS files
|
// Copy all Bootstrap SCSS files
|
||||||
gulp.src(paths.node + 'bootstrap/scss/**/*.scss')
|
gulp.src( paths.node + 'bootstrap/scss/**/*.scss' )
|
||||||
.pipe(gulp.dest(paths.dev + '/sass/bootstrap4'));
|
.pipe( gulp.dest( paths.dev + '/sass/bootstrap4' ) );
|
||||||
|
|
||||||
////////////////// End Bootstrap 4 Assets /////////////////////////
|
////////////////// End Bootstrap 4 Assets /////////////////////////
|
||||||
|
|
||||||
// Copy all Font Awesome Fonts
|
// Copy all Font Awesome Fonts
|
||||||
gulp.src(paths.node + 'font-awesome/fonts/**/*.{ttf,woff,woff2,eot,svg}')
|
gulp.src( paths.node + 'font-awesome/fonts/**/*.{ttf,woff,woff2,eot,svg}' )
|
||||||
.pipe(gulp.dest('./fonts'));
|
.pipe( gulp.dest( './fonts') );
|
||||||
|
|
||||||
// Copy all Font Awesome SCSS files
|
// Copy all Font Awesome SCSS files
|
||||||
gulp.src(paths.node + 'font-awesome/scss/*.scss')
|
gulp.src( paths.node + 'font-awesome/scss/*.scss' )
|
||||||
.pipe(gulp.dest(paths.dev + '/sass/fontawesome'));
|
.pipe( gulp.dest( paths.dev + '/sass/fontawesome' ) );
|
||||||
|
|
||||||
// _s SCSS files
|
// _s SCSS files
|
||||||
gulp.src(paths.node + 'undescores-for-npm/sass/media/*.scss')
|
gulp.src( paths.node + 'undescores-for-npm/sass/media/*.scss' )
|
||||||
.pipe(gulp.dest(paths.dev + '/sass/underscores'));
|
.pipe( gulp.dest( paths.dev + '/sass/underscores' ) );
|
||||||
|
|
||||||
// _s JS files into /src/js
|
// _s JS files into /src/js
|
||||||
gulp.src(paths.node + 'undescores-for-npm/js/skip-link-focus-fix.js')
|
gulp.src( paths.node + 'undescores-for-npm/js/skip-link-focus-fix.js' )
|
||||||
.pipe(gulp.dest(paths.dev + '/js'));
|
.pipe( gulp.dest( paths.dev + '/js' ) );
|
||||||
|
|
||||||
// _s JS files into /js
|
// _s JS files into /js
|
||||||
gulp.src(paths.node + 'undescores-for-npm/js/skip-link-focus-fix.js')
|
gulp.src( paths.node + 'undescores-for-npm/js/skip-link-focus-fix.js' )
|
||||||
.pipe(gulp.dest(paths.js + paths.vendor));
|
.pipe( gulp.dest( paths.js + paths.vendor ) );
|
||||||
|
|
||||||
// Copy Popper JS files
|
// Copy Popper JS files
|
||||||
|
|
||||||
gulp.src(paths.node + 'popper.js/dist/umd/popper.min.js')
|
gulp.src( paths.node + 'popper.js/dist/umd/popper.min.js' )
|
||||||
.pipe(gulp.dest(paths.js + paths.vendor));
|
.pipe( gulp.dest( paths.js + paths.vendor ) );
|
||||||
gulp.src(paths.node + 'popper.js/dist/umd/popper.js')
|
gulp.src( paths.node + 'popper.js/dist/umd/popper.js' )
|
||||||
.pipe(gulp.dest(paths.js + paths.vendor));
|
.pipe( gulp.dest( paths.js + paths.vendor ) );
|
||||||
return stream;
|
return stream;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Deleting the files distributed by the copy-assets task
|
// Deleting the files distributed by the copy-assets task
|
||||||
gulp.task( 'clean-vendor-assets', function () {
|
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
|
// Run
|
||||||
// gulp dist
|
// gulp dist
|
||||||
// Copies the files to the /dist folder for distribution as simple theme
|
// Copies the files to the /dist folder for distribution as simple theme
|
||||||
gulp.task( 'dist', ['clean-dist'], function() {
|
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})
|
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/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/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( replace( '/js/skip-link-focus-fix.js', '/js'+paths.vendor+'/skip-link-focus-fix.js', { 'skipBinary': true } ) )
|
||||||
.pipe(gulp.dest(paths.dist));
|
.pipe(gulp.dest( paths.dist ) );
|
||||||
});
|
});
|
||||||
|
|
||||||
// Deleting any file inside the /dist folder
|
// Deleting any file inside the /dist folder
|
||||||
gulp.task( 'clean-dist', function () {
|
gulp.task( 'clean-dist', function () {
|
||||||
return del([paths.dist + '/**']);
|
return del( [paths.dist + '/**'] );
|
||||||
});
|
});
|
||||||
|
|
||||||
// Run
|
// Run
|
||||||
|
@ -279,9 +279,9 @@ gulp.task( 'clean-dist', function () {
|
||||||
gulp.task( 'dist-product', ['clean-dist-product'], function() {
|
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 ) );
|
.pipe( gulp.dest( paths.distprod ) );
|
||||||
});
|
} );
|
||||||
|
|
||||||
// Deleting any file inside the /dist-product folder
|
// Deleting any file inside the /dist-product folder
|
||||||
gulp.task( 'clean-dist-product', function () {
|
gulp.task( 'clean-dist-product', function () {
|
||||||
return del( [paths.distprod + '/**'] );
|
return del( [paths.distprod + '/**'] );
|
||||||
});
|
} );
|
||||||
|
|
Reference in New Issue