gulp - Unexpected end of input prelude.js -
i trying work replicate problem having adding react existing application. unfortunately, @ moment running different problem trying reproduce original problem.
the basic structure new base module compiled browserify concatenated existing module bootsraps application now.
var gulp = require('gulp'); var browserify = require('browserify'); var reactify = require('reactify'); var source = require('vinyl-source-stream'); var concat = require('gulp-concat'); gulp.task('default', ['browserify', 'concat']); gulp.task('browserify', function(){ return browserify({ entries: ['./src/app.js'], transform: [["reactify", {"es6": true}]], extensions: ['.jsx'], debug: true, standalone: 'app' }).bundle() .pipe(source('browserifypackage.js')) .pipe(gulp.dest('./oldsrc')); }) gulp.task('concat', ['browserify'], function(){ return gulp.src(['./oldsrc/browserifypackage.js', './oldsrc/app.js']) .pipe(concat('app.js')) .pipe(gulp.dest('./')); })
the new module pretty simple
window.react = require('react'); module.exports = { todosection: require('./todosection') }
and old app looks this
_.extend(app, (function(){ return { init: function(){ react.render(new app.todosection(), document.getelementbyid('body')); }} })) window.addeventlistener('load', function() { app.init(); }, false).
when try use file though "unexpected end of line" within prelude.js in browserify. don't see obvious problem, missing something.
the complete example project can found on github
the issue period @ end of line:
window.addeventlistener('load', function() { app.init(); }, false).
Comments
Post a Comment