trying to put this in the viewing task?
browserify -e test/spec/suite.js -t reactify -t rewireify -o test/spec/bundle.js
My gulp file currently:
var gulp = require('gulp'),
requireDir = require('require-dir');
requireDir('./gulp-tasks');
gulp.task('default', ['browserify','css','karma'], function () {
gulp.watch('../App/src/**/*.js', ['browserify']);
gulp.watch('../App/src/**/*.css', ['css']);
gulp.watch('../App/src/tests/**/*.js', ['rewireify']);
gulp.watch('../App/src/tests/**/*.js', ['karma']);
});
gulp.task('production', ['react', 'css']);
rewireify.js:
var gulp = require('gulp'),
concat = require('gulp-concat'),
rewireify = require('rewireify');
gulp.task('css', function () {
gulp.src([
'./App/src/tests/**/*.js'
])
.pipe(concat('bundletest.js'))
.pipe(rewireify())
.pipe(gulp.dest('test/spec/bundle.js'));
});
when I run the gulp task, I get an error:
TypeError: Cannot read property 'ignore' of undefined
at rewireify (d:\Source\Workspaces\\node_modules\rewireify\lib\index.js:12:20)
at Gulp.<anonymous> (d:\Source\Workspaces\Call Parents\DEV\CG.CallParents.Web\Areas\Beta\gulp-tasks\rewireify.js:10:15)
at module.exports (d:\Source\Workspaces\\node_modules\orchestrator\lib\runTask.js:34:7)
at Gulp.Orchestrator._runTask (d:\Source\gulp\node_modules\orchestrator\index.js:273:3)
at Gulp.Orchestrator._runStep (d:\Source\\gulp\node_modules\orchestrator\index.js:214:10)
at Gulp.Orchestrator.start (d:\Source\Workspaces\\node_modules\gulp\node_modules\orchestrator\index.js:134:8)
at C:\Users\matthew.harris\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:129:20
at process._tickCallback (node.js:355:11)
at Function.Module.runMain (module.js:503:11)
at startup (node.js:129:16)
Does anyone know how I can make it work?
source
share