You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to put forth a generic example with the hopes that it would be easy to translate existing gulp-browserify recipes to a vanilla recipe.
I had previously touched briefly on using reactify transform in the README.md here.
But I guess that gets buried in all of that words.
I guess I could write a separate browserify recipe for reactify.
I would like to gather more use-cases for a typical browserify + reactify builds before that.
Could you share your typical build?
In the mean time, here's a quick one thats equivalent to the one you posted:
vargulp=require('gulp');varbrowserify=require('browserify');varreactify=require('reactify');varrename=require('gulp-rename');gulp.task('browserify',function(){varbrowserified=transform(function(filename){varb=browserify(filename,{insertGlobals: true,extensions: ['.jsx']});b.transform(reactify);returnb.bundle();});returngulp.src('./src/javascripts/app.jsx').pipe(browserified).pipe(rename('app.js')// rename it or else the result file would be `app.jsx`.pipe(gulp.dest('./build/javascripts'));});
Would be incredibly useful to see an extension of your browserify vanilla example that included a JSX transform (reactify).
Something along the lines of this gulp-browserify based sample:
The text was updated successfully, but these errors were encountered: