Skip to content

Instantly share code, notes, and snippets.

@hoorayimhelping
Created October 5, 2015 18:59
Show Gist options
  • Save hoorayimhelping/fa47e3c9495d3117bfaf to your computer and use it in GitHub Desktop.
Save hoorayimhelping/fa47e3c9495d3117bfaf to your computer and use it in GitHub Desktop.
diff --git a/gulpfile.js b/gulpfile.js
index ce9c54e..221e6ac 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -11,7 +11,7 @@ var shell = require('gulp-shell');
var react = require('gulp-react');
var paths = {
- 'js_source': 'js/graph/',
+ 'js_source': 'js/**/',
'js_test': 'js/test/',
'js_dist': 'js/',
'react_source': 'js/views/',
@@ -52,10 +52,6 @@ gulp.task('transform', function() {
.pipe(gulp.dest(paths.react_dist));
});
-gulp.task('watch', function() {
- gulp.watch(paths.react_source + '/*.jsx', ['build']);
-});
-
gulp.task('build', function() {
return browserify(paths.react_dist + 'main.js')
.transform(reactify)
@@ -64,6 +60,10 @@ gulp.task('build', function() {
.pipe(gulp.dest(paths.js_dist));
});
+gulp.task('watch', function() {
+ gulp.watch([paths.react_source + '/*.jsx', paths.js_source + '/*.js'], ['env-dev', 'transform', 'build']);
+});
+
gulp.task('development', ['env-dev', 'lint', 'test', 'transform', 'build']);
gulp.task('production', ['env-prod', 'lint', 'test', 'transform', 'build']);
gulp.task('pre-commit', ['production']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment