Compare commits

...

6 commits

Author SHA1 Message Date
Sami Samhuri
0452df8944 fix package version 2012-02-24 20:42:30 -08:00
Sami Samhuri
e1ea5e39b7 allow spaces in directory names 2012-02-24 20:10:11 -08:00
Sami Samhuri
a9f0908e1f 0.1.9 2011-11-05 18:59:06 -07:00
Sami Samhuri
4f7823d11a fix required node version 2011-11-05 18:58:32 -07:00
Sami Samhuri
4da17cbfcc 0.1.8 2011-11-05 15:52:03 -07:00
Sami Samhuri
f0bf25fa79 node v0.6 2011-11-05 15:51:35 -07:00
2 changed files with 9 additions and 7 deletions

View file

@ -54,10 +54,10 @@ function main() {
// <trigger> <dir> <command>
var m
if (m = line.match(/^([-+]{0,2})\s*(\S+)\s+(.+)$/i)) {
if (m = line.match(/^([-+]{0,2})\s*(?:"([^"]+)"|(\S+))\s+(.+)$/i)) {
var trigger = m[1] || '+-' // default watches for both
, dir = m[2]
, command = m[3]
, dir = m[2] || m[3]
, command = m[4]
, options = { create: trigger.indexOf('+') !== -1
, remove: trigger.indexOf('-') !== -1
, command: command
@ -181,7 +181,9 @@ function spiel() {
, " - todo update-remote-todo-list.sh"
, ""
, "So each line has an optional trigger followed by a directory and"
, "then a command. The triggers are:"
, "then a command. The directory can be quoted if it contains spaces."
, ""
, "The triggers are:"
, ""
, " + files are created"
, " - files are removed"

View file

@ -1,7 +1,7 @@
{
"name": "northwatcher",
"description": "NorthWatcher is cron for filesystem changes.",
"version": "0.1.6",
"version": "0.2.0",
"homepage": "http://samhuri.net/proj/NorthWatcher",
"author": "Sami Samhuri <sami@samhuri.net>",
"repository": {
@ -17,7 +17,7 @@
},
"main": "./northwatcher.js",
"engines": {
"node": "0.4.x"
"node": ">=0.4.x"
},
"licenses": [
{
@ -30,4 +30,4 @@
"optimist": "0.2.x"
},
"devDependencies": {}
}
}