/**
 * Created by mdemo on 2014/4/25.
 */
var browserify = require('browserify');
var gulp = require('gulp');
var source = require('vinyl-source-stream');
var uglify = require('gulp-uglify');
var streamify = require('gulp-streamify');
gulp.task('browserify', function() {
    return browserify()
        .require('./click',{ expose: 'click' })
        .bundle()
        //Pass desired output filename to vinyl-source-stream
        .pipe(source('module.js'))
        .pipe(streamify(uglify()))
        // Start piping stream to tasks!
        .pipe(gulp.dest('./'));
});
gulp.task('default', ['browserify']);
@@ -564,16 +564,95 @@
 ));%0A%7D);%0A
+gulp.task('watch', function()%7B%0A    gulp.watch('./click.js',%5B'browserify'%5D)%0A%7D);%0A
 gulp.tas
@@ -677,11 +677,19 @@
 wserify'
+,'watch'
 %5D);

add watch