在Webstorm发布时自动运行Gulp任务'观察'

Lab*_*tis 1 webstorm gulp

有没有办法在Webstorm发布上运行Gulp任务?

尝试通过webstorm设置但看不到任何东西,Gulp集成对Webstorm 9来说是全新的.

gulp.task('watch', function () {

    gulp.watch(paths.watch.css, function(){ compileLESS(paths.src.css, paths.dest.css, {name: 'Style'}) });
    gulp.watch(paths.watch.cssBootstrap, function(){ compileLESS(paths.src.cssBootstrap ,paths.dest.cssBootstrap, {suffix: '.min', name: 'Bootstrap'}) });

    gulp.watch(paths.watch.scripts, ['scripts']);
    gulp.watch(paths.watch.libraries, ['libraries']);

});
Run Code Online (Sandbox Code Playgroud)

只想要一种方法来运行Gulp'watch '(如果项目有吞咽和一项名为watch的任务),我什么时候开始使用Webstorm.

Rya*_*yan 9

从WebStorm 11开始,这是可能的.

  1. 设置>工具>启动任务
  2. 点击绿色加号图标 Add New Configuration
  3. 选择 Gulp.js
  4. 从Tasks:下拉列表中选择要运行的任务

完成!