Comparing version 0.2.1 to 0.2.2
@@ -38,7 +38,3 @@ var path = require('path'); | ||
var config_file = '{ \ | ||
"template_dir": "templates", \ | ||
"content_dir": "contents", \ | ||
"output_dir": "public" \ | ||
}'; | ||
var config_file = '{\n\"template_dir": "templates",\n\"content_dir": "contents",\n\"output_dir": "public",\n\"server": {\n\ "port": 9009\n\ }\n\}'; | ||
@@ -68,8 +64,15 @@ fs.writeFile(dir_name + '/config.json', config_file, function (err) { | ||
server: function(args){ | ||
var config_file = "config.json"; | ||
if(args.length && args[0].indexOf(".json") > 1){ | ||
var config_file = args[0]; | ||
var override_port = false; | ||
} else { | ||
var config_file = "config.json"; | ||
var override_port = true; | ||
} | ||
get_config(config_file, function(supplied_config){ | ||
if(parseInt(args[0]) > 0){ | ||
supplied_config["server"]["port"] = parseInt(args[1]); | ||
if(override_port && parseInt(args[0]) > 0){ | ||
supplied_config["server"]["port"] = parseInt(args[0]); | ||
} | ||
@@ -76,0 +79,0 @@ |
@@ -5,3 +5,3 @@ { | ||
, "keywords": ["static", "sites", "mustache", "json", "markdown"] | ||
, "version": "0.2.1" | ||
, "version": "0.2.2" | ||
, "homepage": "https://github.com/laktek/punch" | ||
@@ -8,0 +8,0 @@ , "author": "Lakshan Perera <lakshan@web2media.net> (http://laktek.com)" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
115563
2928