gulp watch TypeError:需要glob模式字符串

时间:2016-02-05 16:06:16

标签: gulp poedit po

我的应用程序中有.po文件。我已经创建了一个手表来查看翻译文件何时被更改并编译它们

gulp.task('translations', () => gulp
  .src('po/.*po',) 
  .pipe(gettext.compile({format: 'json'}))
  .pipe(gulp.dest('dist/translations/')));
)

gulp.task('watch', () => {
  gulp.watch('po/**/*.po', ['translations']);
});

我使用poedit如果我做了一些改动就行了,但是如果我只是点击保存按钮而没有新的改变那么gulp进程就会抛出错误TypeError: glob pattern string required

更新

我为gulp-watch包改变了gulp.watch,它给了我更好的信息

ENOENT: no such file or directory, stat '/home/rkmax/Development/MyProject/po/es_ES.temp.po'

0 个答案:

没有答案