# JavaScript - Google Closure Compiler V.S. Gulp uglify ## Intro I have two choice
Google Closure Compiler
UglifyJs
### Google Closure Compiler Google Closure Compiler
Google Closure Compiler is a tool for minify and uglify js.
From Google
Java
Command Line
Slow
### UglifyJs mishoo/UglifyJS2
More option setting
Node.js
Command Line
Fast
## Test ### Google Closure Compiler When i run command line, it used lot of cpu source.
...
Category: Gulp
# gulp.js - Concatenate File When Gulp Watch ## package.json { "name": "gulp", "version": "3.8.7", "devDependencies": { "gulp": "^3.9.0", "gulp-concat": "^2.6.0", "gulp-watch": "^4.3.4" } } ## gulpfile.js var gulp = require('gulp'), watch = require('gulp-watch'), concat = require('gulp-concat'); var js; gulp.task('concat', function (cb) { var options = {}; watch('dev/*.js', options, function (e) { // console.log('e:'+JSON.stringify(e)); // console.log('\n'); console.log(new Date() + ' -- ' + e.history[0].replace(e.base, '')); js = e.history[0].replace(e.base, ''); gulp.
...
# gulp.js - Use Log ## Intro gulp.js
Getting Started
Grunt vs Gulp - Beyond the Numbers
## package.json version setting dependencies
## How to pipe to another task in Gulp? gulp.task('first', function() { // first task }); gulp.task('second', ['first'], function() { // this occurs after 'first' finishes }); Refer - How to pipe to another task in Gulp?
## Use Package ## Compass First, must install compass
gulp-compass
...