我正在大口大口地使用watchify。在使用notepad++编辑源代码时,watchify运行得很好,但当我使用Jetbrain Webstorm 8编辑时,它什么也不做。以下是我的吞吐文件:
var browserify = require('browserify');
var watchify = require('watchify');
var gulp = require('gulp');
var source = require('vinyl-source-stream');
gulp.task('watchify', function(){
var bundler = browserify('./app/js/app.js', {
debug: true,
cache: {},
packageCache: {}
fullPaths: true
});
var watcher = watchify(bundler);
return watcher.on('update', function () { // When any files update
console.log('Updating!');
var updateStart = Date.now();
watcher.bundle()
.pipe(source('bundle.js'))
.pipe(gulp.dest('./app/js'));
console.log('Updated!', (Date.now() - updateStart) + 'ms');
})
.bundle() // Create the initial bundle when starting the task
.pipe(source('bundle.js'))
.pipe(gulp.dest('./app/js'));
});有没有办法让watchify与Webstorm一起工作?谢谢你的帮助。
发布于 2015-10-29 17:21:06
我张贴这篇文章只是为了将来的搜索者--我认为这个问题的原因是启用了“使用安全写入”的。禁用后,问题似乎消失了。
https://stackoverflow.com/questions/29986083
复制相似问题