Last active
August 29, 2015 14:20
-
-
Save zofe/0221049792604fbe1224 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| var gulp = require('gulp'); | |
| var react = require('gulp-react'); | |
| var browserify = require('gulp-browserify'); | |
| var uglify = require('gulp-uglify'); | |
| gulp.task('jsx', function () { | |
| return gulp.src('./src/**/*.jsx') | |
| .pipe(react({harmony: true})) | |
| .pipe(browserify({insertGlobals : true})) | |
| .pipe(uglify()) | |
| .pipe(gulp.dest('./lib')); | |
| }); | |
| gulp.task('watch', function() { | |
| gulp.watch('src/**/*.jsx', ['jsx']); | |
| }); | |
| gulp.task('default',['watch']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment