Skip to content

Commit

Permalink
package.json will lock version
Browse files Browse the repository at this point in the history
  • Loading branch information
evantahler committed Dec 1, 2012
1 parent 70220fd commit 8dc2420
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bin/actionHero
Expand Up @@ -7,14 +7,14 @@ binary.cluster = require('cluster');
binary.async = require('async');
binary.spawn = require('child_process').spawn

binary.utils = {};

binary.useColors = true;

///////////////
// utilities //
///////////////

binary.utils = {};

binary.log = function(message, styles){
if(binary.useColors == true){
if (styles == null){styles = ["white"];}
Expand Down
5 changes: 4 additions & 1 deletion bin/include/generate.js
Expand Up @@ -51,6 +51,7 @@
});

documents.config_js = binary.fs.readFileSync(binary.project_root + "/node_modules/actionHero/config.js");
documents.package_json = binary.fs.readFileSync(binary.project_root + "/node_modules/actionHero/package.json");
documents.routes_js = binary.fs.readFileSync(binary.project_root + "/node_modules/actionHero/routes.js");
documents.cert_pem = binary.fs.readFileSync(binary.project_root + "/node_modules/actionHero/certs/server-cert.pem");
documents.key_pem = binary.fs.readFileSync(binary.project_root + "/node_modules/actionHero/certs/server-key.pem");
Expand Down Expand Up @@ -82,6 +83,8 @@
documents.public_actionHeroWebSocket = binary.fs.readFileSync(__dirname + "/../../public/javascripts/actionHeroWebSocket.js");
}

var AHversionNumber = JSON.parse(documents.package_json).version;

documents.package_json = "{\r\n\
\"author\": \"YOU <YOU@example.com>\",\r\n\
\"name\": \"my_actionHero_project\",\r\n\
Expand All @@ -98,7 +101,7 @@
\"node\": \">=0.6.0\"\r\n\
},\r\n\
\"dependencies\": {\r\n\
\"actionHero\": \"x\"\r\n\
\"actionHero\": \""+AHversionNumber+"\"\r\n\
},\r\n\
\"devDependencies\": {},\r\n\
\"scripts\": {\r\n\
Expand Down

0 comments on commit 8dc2420

Please sign in to comment.