Open imyoka opened 9 years ago
I want to transfer the variable of DEMO_NAME to main.coffee.But when comes to browserify, the ouput simply print literally ''/* @echo DEMO_NAME */''. Surely the browserify issues ,right?
gulp.task 'browserify', -> options = transform: ['coffeeify'] extensions: ['.coffee'] gulp.src('./view/coffee/main.coffee', read: false) .pipe(plumber(errorHandler: notify.onError("Error: <%= error.message %>"))) .pipe(browserify(options)) .pipe(preprocess({context: { NODE_ENV: 'TEST', DEMO_NAME: demoName, DEBUG: true}})) .pipe(rename('main.js')) .pipe(gulp.dest('test/')) .pipe(notify('browserify success!')) .pipe(connect.reload())
I want to transfer the variable of DEMO_NAME to main.coffee.But when comes to browserify, the ouput simply print literally ''/* @echo DEMO_NAME */''. Surely the browserify issues ,right?