Permalink
Browse files

bump, bug-fix

  • Loading branch information...
1 parent ef60abd commit 7b53d76b97088a4cfd4960d9c615102c8334b8ab @kalisjoshua committed Sep 12, 2012
Showing with 12 additions and 13 deletions.
  1. +2 −1 README.md
  2. +6 −8 lib/main.js
  3. +4 −4 package.json
View
3 README.md
@@ -10,9 +10,10 @@ I have started using this in conjunction with Grunt.js so I don't have to grunt
Create a file in the root of your project with the contents below; don't forget chmod +x <filename>.
+ #!/usr/bin/env node
/*jshint laxcomma:true strict:false*/
/*globals require*/
- var sherpa = require("sherpa")
+ var sherpa = require("sherpa");
var backpack = {
js : function (filename) {
View
14 lib/main.js
@@ -22,7 +22,7 @@ function valid_root (val) {
function walk (start, callback) {
fs.lstat(start, function (err, stat) {
-
+ if (err) { return callback(err); }
if (stat.isDirectory()) {
fs.readdir(start, function (err, files) {
@@ -36,13 +36,11 @@ function walk (start, callback) {
return acc;
}, []);
- return callback(null, start, coll.names);
+ return callback(null, start, coll);
});
} else {
- err = new Error("path: " + start + " is not a directory");
+ return callback(new Error("path: " + start + " is not a directory"));
}
-
- return callback(err);
});
}
@@ -57,11 +55,11 @@ module.exports = function (root, interval, callback) {
}
var opts = {
- persistent: true
- , interval: interval || 5007
+ persistent: true
+ , interval: interval || 5007
};
- puts(null, "Watching", root, "every", opts.interval / 1000, "seconds for changes...");
+ puts(null, "Watching " + root + " every " + opts.interval / 1000 + " seconds for changes...");
walk(root, function (err, dir, files) {
files
View
8 package.json
@@ -2,17 +2,17 @@
"author": "Joshua T Kalis <kalisjoshua@gmail.com> (http://joshuakalis.com)",
"name": "sherpa",
"description": "Watch files in a directory for changes/updates",
- "version": "0.1.6",
+ "version": "0.1.7",
"homepage": "https://github.com/kalisjoshua/sherpa",
"repository": {
"type": "git",
"url": "https://github.com/kalisjoshua/sherpa.git"
},
"main": "lib/main.js",
- "dependencies": {
+ "dependencies": {},
+ "devDependencies": {
"expresso": ">=0.9.2"
- },
- "devDependencies": {},
+ },
"optionalDependencies": {},
"engines": {
"node": "*"

0 comments on commit 7b53d76

Please sign in to comment.