mikaelbr / node-notifier-cli

CLI API for node-notifier as separate package.
143 stars 13 forks source link

Notifying using Nodemon #7

Open atulmy opened 6 years ago

atulmy commented 6 years ago

I'm trying to add node-notifier-cli in development build script, however as a script, it does not work:

package.json

{
  "scripts": {
    "notify": "notify -t \"Development\" -m \"Build complete.\""
  }
}

nodemon.json

Does not work

{
  "events": {
    "restart": "npm run build && npm run notify"
  }
}

Works

{
  "events": {
    "restart": "npm run build && osascript -e 'display notification \"app restarted\" with title \"nodemon\"'"
  }
}
seawatts commented 6 years ago

Having the same issue. Did you resolve this?

atulmy commented 6 years ago

@seawatts nope, still using the native command osascript for now: https://github.com/atulmy/hire-smart/blob/master/code/web/package.json#L15

devinus commented 5 years ago

Had the exact same issue. I had to explicity use & at the end of my commands.

Slessi commented 5 years ago

Made a fork at https://github.com/Slessi/nodemon-notifier-cli which works for me, too lazy to publish to npm though

acharlop commented 4 years ago

For anyone that comes across this I've published the fix Slessi was to lazy to publish nodemon-notifier-cli