Skip to content

Instantly share code, notes, and snippets.

@masnagam
Last active October 28, 2017 03:06
Show Gist options
  • Select an option

  • Save masnagam/6f4c3b5b3653dec4c550 to your computer and use it in GitHub Desktop.

Select an option

Save masnagam/6f4c3b5b3653dec4c550 to your computer and use it in GitHub Desktop.
Emacsを使って既存のファイルを編集していると,gulp.watch内でクラッシュが発生する問題の回避方法 ref: http://qiita.com/masnagam/items/33f4ae8a663539627b94
gulp.watch ['path/to/**/*.coffee'], ['compile']
[20:35:04] Error: ENOENT, no such file or directory 'path/to/.#file.coffee'
$ npm install git+https://github.com/masnagam/glob-chokidar.git --save-dev
watch = require 'glob-chokidar'
gulp.task 'watch', ->
watch ['path/to/**/*.coffee'], -> gulp.start ['compile']
watch ['path/to/compiled/assets/**']
.on 'change', (path) ->
...
gulp.watch ['path/to/*.include', '!path/to/*.exclude'], ['task']
watch ['path/to/*.include'], ignored: ['path/to/*.exclude'], ->
...
gulp.watch ['path/to/**'], ['task']
touch path/to/new.coffee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment