$ npm install sentry
sentry = require 'sentry'# Watch changes in file.jssentrywatch 'file.js' consolelog "A change has been made in "# Watch changes on any file ending in .coffee one directory deepsentrywatch 'fld/*.coffee'-># Watch changes recursively on any filessentrywatch 'fld/**/*'-># Watch files recursively that match a regexsentrywatchRegExp 'fld/'/regex/-># If you pass a string instead of a function it'll execute that child processsentrywatch 'file.coffee''coffee -c'
Sentry comes with two methods
Optionally you may pass a task which will send
(err, stdout, stderr) as the arguments to the callback
sentrywatch 'file.js''coffee -c'
Or simply just a callback and Sentry will pass the filename to the callback
Feel free to use wildcards with extensions
# Find all files one directory deepsentrywatch '/folder/*'-># Find all files one directory deep ending in .coffeesentrywatch '/folder/*.coffee'-># Find all files recursivelysentrywatch '/folder/**/*'-># Find all files recursively ending in .txtsentrywatch '/folder/**/*.txt'->
Just like sentry.watch but instead you must pass a root directory and regular expression to match files against.
# Find all files in this folder that end in .coffeesentrywatchRegExp ''/\.coffee$/-># Find all files in the adjacent 'test' folder that begin with test and end in .coffeesentrywatchRegExp '../tests/'/^test_,.coffee$/->
Sentry uses Jasmine-node for testing. Simply run the jasmine-node command with the coffeescript flag
jasmine-node spec --coffee