Permalink
Browse files

0.1.1 - Make sure paths are handled correctly

  • Loading branch information...
tim-smart committed Feb 22, 2011
1 parent c4584d7 commit 6f4a010f62ff756379d2b30012f640ce83007225
Showing with 13 additions and 7 deletions.
  1. +7 −5 bin/npm-deploy
  2. +1 −1 package.json
  3. +5 −1 test/mixture/deploy.js
View
@@ -44,7 +44,7 @@ var readJson = function (file, callback) {
} catch (error) {
callback(error);
}
- })
+ });
};
/**
@@ -140,10 +140,10 @@ var _executeCommands = function (commands) {
// Setup paths
var root = cwd = process.cwd(),
- deploy_obj, package_json;
+ deploy_obj, package_json, deploy_config;
// Is the deploy json file specified?
-if (deploy_obj = process.argv[process.argv.indexOf(__filename) + 1]) {
+if (deploy_obj = process.argv[2]) {
root = path.dirname(deploy_obj);
} else {
deploy_obj = 'deploy.js';
@@ -164,7 +164,9 @@ package_json = root + '/package.json';
// Load the deploy script.
try {
- deploy_obj = require(deploy_obj);
+ deploy_obj = require(deploy_obj);
+ deploy_config = deploy_obj.config || deploy_config;
+ deploy_obj = deploy_obj.script;
} catch (error) {
deploy_obj = {};
}
@@ -189,7 +191,7 @@ readJson(package_json, function (error, json) {
}
deploy_obj[name] = {
- type: "npm"
+ type: "npm"
};
}
}
View
@@ -1,7 +1,7 @@
{
"name": "npm-deploy",
"description": "Simple cli utility for installing dependenies and running deployment scripts.",
- "version": "0.1.0",
+ "version": "0.1.1",
"author": "Tim Smart",
"repository": {
"type": "git",
View
@@ -1,4 +1,8 @@
-module.exports = {
+exports.options = {
+
+};
+
+exports.script = {
"id3": {
"type": "npm"
},

0 comments on commit 6f4a010

Please sign in to comment.