首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Watchify在使用Webstorm时不会更新

Watchify在使用Webstorm时不会更新
EN

Stack Overflow用户
提问于 2015-05-01 19:32:39
回答 1查看 476关注 0票数 2

我正在大口大口地使用watchify。在使用notepad++编辑源代码时,watchify运行得很好,但当我使用Jetbrain Webstorm 8编辑时,它什么也不做。以下是我的吞吐文件:

代码语言:javascript
复制
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一起工作?谢谢你的帮助。

EN

回答 1

Stack Overflow用户

发布于 2015-10-29 17:21:06

我张贴这篇文章只是为了将来的搜索者--我认为这个问题的原因是启用了“使用安全写入”的。禁用后,问题似乎消失了。

https://github.com/substack/watchify/issues/179

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29986083

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档