Skip to content

Commit

Permalink
add gulp script for minification of JS,and the minification result #177
Browse files Browse the repository at this point in the history
  • Loading branch information
markkap committed Aug 5, 2018
1 parent 62bf3b8 commit 0fd433a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
16 changes: 16 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var rename = require("gulp-rename");

gulp.task( 'default', [ 'scripts' ] )

// Gulp task to minify JavaScript files
gulp.task('scripts', function() {
return gulp.src('./js/**/*.js')
// Minify the file
.pipe(uglify())
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest(function(file) {
return file.base;
}));
});
1 change: 1 addition & 0 deletions js/admin/category-posts-widget.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions js/admin/tinymce.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions js/frontend/category-posts-frontend.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0fd433a

Please sign in to comment.