generator-react-reflux
generator-react-reflux copied to clipboard
"gulp build" does not work properly
The problem is in the 'scripts' task.:
runSequence(['clean:dev', 'clean:dist'], ['scripts', 'compass', 'imagemin'], 'bundle', 'copy');
The tasks do not run in the correct sequence --the 'bundle' task starts before the 'scripts' task finishes. Because of this lag, there is no scripts folder available in the 'dist' folder for the bundle to use.
I guess the issue comme from gulpfile.js, can you try to replace at the end of the function of gulp.task('scripts', function() {}), the part of code:
} else { bundle(); }
By this one below, and try again?
} else { return bundle(); }
If it works, i will create a pull request for the fix, thx.
In order to implement your suggestion I also needed to add a return to the 'bundle' function. Now it works fine. Thank you!