LoginSignup
13
13

More than 5 years have passed since last update.

Gruntタスクの失敗をNotification CenterやGrowlなどにお知らせしてくれるgrunt-notify

Last updated at Posted at 2013-05-04

gruntでタスクを手作業で実行するときはタスク失敗してもまあ気付くことが出来るけど、grunt watchしていてタスクが失敗したら知らせて欲しい。
coffeescript書いててjsにコンパイル失敗した時とか特に。
そういうときにgrunt-notifyが便利でした。

OSXのMountainLion環境でインストールしてGruntfileに書き込むだけで動きました。

まずはpackage.jsonに"grunt-notify": "~0.2"を追加してnpm install

あとはloadNpmTasksでgrunt-notifyを追加。

grunt.loadNpmTasks 'grunt-notify'

javascriptならこうですね。

grunt.loadNpmTasks('grunt-notify');

そしたらもうgruntタスクが失敗した時にNotification Centerでお知らせをしてくれた。これだけでサッと動いてくれるのがありがたい。

13
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
13