mirror of
https://github.com/samsonjs/NorthWatcher.git
synced 2026-04-27 15:07:46 +00:00
fix trigger regex, update package.json, use new version of batteries
This commit is contained in:
parent
f44b80b807
commit
72993faa34
2 changed files with 5 additions and 5 deletions
|
|
@ -18,7 +18,7 @@ var fs = require('fs')
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
var path = require('path')
|
var path = require('path')
|
||||||
, eachLine = require('batteries').FileExt.eachLine
|
, eachLine = require('batteries').fs.eachLine
|
||||||
, rcFile = require('path').join(process.env.HOME, '.northwatcher')
|
, rcFile = require('path').join(process.env.HOME, '.northwatcher')
|
||||||
|
|
||||||
fs.stat(rcFile, function(err, s) {
|
fs.stat(rcFile, function(err, s) {
|
||||||
|
|
@ -35,7 +35,7 @@ function main() {
|
||||||
|
|
||||||
// <trigger> <dir> <command>
|
// <trigger> <dir> <command>
|
||||||
var m
|
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
|
var trigger = m[1] || '+-' // default watches for both
|
||||||
, dir = m[2]
|
, dir = m[2]
|
||||||
, command = m[3]
|
, command = m[3]
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
, "description" : "NorthWatcher is cron for filesystem changes."
|
, "description" : "NorthWatcher is cron for filesystem changes."
|
||||||
, "version" : "0.1.4"
|
, "version" : "0.1.4"
|
||||||
, "homepage" : "http://samhuri.net/proj/NorthWatcher"
|
, "homepage" : "http://samhuri.net/proj/NorthWatcher"
|
||||||
, "author" : "Sami Samhuri <sami.samhuri@gmail.com>"
|
, "author" : "Sami Samhuri <sami@samhuri.net>"
|
||||||
, "repository" :
|
, "repository" :
|
||||||
{ "type" : "git"
|
{ "type" : "git"
|
||||||
, "url" : "http://github.com/samsonjs/NorthWatcher.git"
|
, "url" : "http://github.com/samsonjs/NorthWatcher.git"
|
||||||
|
|
@ -13,11 +13,11 @@
|
||||||
}
|
}
|
||||||
, "bin" : { "northwatcher" : "./northwatcher.js" }
|
, "bin" : { "northwatcher" : "./northwatcher.js" }
|
||||||
, "main" : "./northwatcher.js"
|
, "main" : "./northwatcher.js"
|
||||||
, "engines" : { "node" : ">=0.4.0" }
|
, "engines" : { "node" : "0.4.x" }
|
||||||
, "licenses" :
|
, "licenses" :
|
||||||
[ { "type" : "MIT"
|
[ { "type" : "MIT"
|
||||||
, "url" : "http://github.com/samsonjs/NorthWatcher/raw/master/LICENSE"
|
, "url" : "http://github.com/samsonjs/NorthWatcher/raw/master/LICENSE"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
, "dependencies" : { "batteries" : "0.2.x" }
|
, "dependencies" : { "batteries" : "0.4.x" }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue