Permalink
Browse files

JS Minificado

  • Loading branch information...
1 parent 99c46e6 commit bdfb042413e07474dd949824231ffd911b93fa14 @HispachanFiles committed May 7, 2016
Showing with 23 additions and 0 deletions.
  1. +9 −0 gulpfile.js
  2. +4 −0 package.json
  3. +10 −0 public/dist/app.min.js
View
@@ -9,6 +9,8 @@ var _ = require('lodash');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
var nodemon = require('gulp-nodemon');
+var buffer = require('vinyl-buffer');
+var minify = require('gulp-minify');
var config = {
entryFile: './client/main.js',
@@ -35,6 +37,13 @@ function bundle() {
.bundle()
.on('error', function(err) { console.log('Error: ' + err.message); })
.pipe(source(config.outputFile))
+ .pipe(buffer())
+ .pipe(minify({
+ ext:{
+ src:'.js',
+ min:'.min.js'
+ }
+ }))
.pipe(gulp.dest(config.outputDir))
.pipe(reload({ stream: true }));
}
View
@@ -14,9 +14,11 @@
"elapsed": "0.0.7",
"express": "~4.13.1",
"glob": "^7.0.3",
+ "http2": "^3.3.4",
"jade": "~1.11.0",
"jquery": "^2.2.3",
"js2xmlparser": "^1.0.0",
+ "letsencrypt-express": "^1.1.5",
"marked": "^0.3.5",
"mkdirp": "^0.5.1",
"mongoose": "^4.4.12",
@@ -38,10 +40,12 @@
"browser-sync": "^2.11.2",
"browserify": "^13.0.0",
"gulp": "^3.9.1",
+ "gulp-minify": "0.0.11",
"gulp-nodemon": "^2.0.6",
"gulp-rename": "^1.2.2",
"lodash": "^2.4.1",
"nodemon": "^1.9.1",
+ "vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.0.0",
"watchify": "^2.1.1"
}
Oops, something went wrong.

0 comments on commit bdfb042

Please sign in to comment.