diff --git a/bin/actionHero b/bin/actionHero index 1e29c2ebf..2b9650e68 100755 --- a/bin/actionHero +++ b/bin/actionHero @@ -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"];} diff --git a/bin/include/generate.js b/bin/include/generate.js index 003581fed..2c93d33a9 100755 --- a/bin/include/generate.js +++ b/bin/include/generate.js @@ -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"); @@ -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 \",\r\n\ \"name\": \"my_actionHero_project\",\r\n\ @@ -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\