Quantcast
Channel: 69log » tec
Viewing all articles
Browse latest Browse all 45

grunt-watchで監視対象ファイルの中で変更があったファイルを取得する

$
0
0

grunt-contrib-watchで監視しているファイルのなかで変更があったファイルのみを取得して、別の処理を行いたかったのでgrunt-contrib-watchをちょっと参考にしてやってみたときのメモ。


CoffeeScriptsを監視して、変更されたファイルをgrunt.logに吐いてみた。

grunt.event.on(‘watch’, callback) でイベントにbindして処理を実行するだけでした。
処理後に Object.create(null) でオブジェクトをリセットすることを忘れないように。


Viewing all articles
Browse latest Browse all 45

Latest Images

Trending Articles



Latest Images