Last active
September 25, 2020 17:39
Star
You must be signed in to star a gist
Gulpfile scripts
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
// Concatenate and uglify global JS files and output the result to the | |
// appropriate location | |
gulp.task('build:scripts:global', function() { | |
return gulp.src([ | |
paths.jsFiles + '/lib' + paths.jsPattern, | |
paths.jsFiles + '/*.js' | |
]) | |
.pipe(concat('main.js')) | |
.pipe(uglify()) | |
.pipe(gulp.dest(paths.jekyllJsFiles)) | |
.pipe(gulp.dest(paths.siteJsFiles)) | |
.on('error', gutil.log); | |
}); | |
// Uglify local JS files and output the result to the appropriate location | |
gulp.task('build:scripts:local', function() { | |
return gulp.src(paths.jsFiles + '/local' + paths.jsPattern) | |
.pipe(uglify()) | |
.pipe(gulp.dest(paths.jekyllJsFiles)) | |
.pipe(gulp.dest(paths.siteJsFiles)) | |
.on('error', gutil.log); | |
}); | |
// Build all scripts | |
gulp.task('build:scripts', ['build:scripts:global', 'build:scripts:local']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment