Skip to content
Browse files

sub path; new version

  • Loading branch information...
1 parent 77e591c commit 45f2a3f2092a74f97846685bf04a25eaa2337721 @cadorn cadorn committed Jan 16, 2012
Showing with 10 additions and 1 deletion.
  1. +9 −0 lib/pinf-loader-js/loader.js
  2. +1 −1 package.json
View
9 lib/pinf-loader-js/loader.js
@@ -169,6 +169,7 @@ var boot = exports.boot = function(options)
optParser.help("Runs the specified program or script through the PINF JavaScript Loader.");
optParser.option("--version").bool().help("Version");
optParser.option("-v", "--verbose").bool().help("Enables progress messages");
+ optParser.option("--sub-path").set().help("Path to root of package within provided program path/URL");
optParser.option("--pidfile").set().help("Write the process ID to the specified file. Remove file on exit. Ensures only one instance at a time.");
optParser.option("--daemonize").bool().help("Daemonize the process. Requires: npm install -g daemon");
optParser.option("--logPath").set().help("Path to file to log stdout and stderr output");
@@ -513,8 +514,16 @@ var boot = exports.boot = function(options)
path = path || "";
if (path.charAt(0) != "/")
path = API.SYSTEM.pwd + "/" + path;
+
+ if (cliOptions["sub-path"])
+ {
+ API.DEBUG.print("Using sub-path: " + cliOptions["sub-path"]);
+ path += "/" + cliOptions["sub-path"];
+ }
+
path = path.split("/");
+ // TODO: Don't remember where this is used. Can probably be removed.
if (/\.zip$/.test(path[path.length-1]))
{
path[path.length-1] += "!/";
View
2 package.json
@@ -1,7 +1,7 @@
{
"uid": "http://registry.pinf.org/pinf.org/github/loader-js/",
"name": "pinf-loader-js",
- "version": "0.3.10",
+ "version": "0.3.11",
"label": "CommonJS Module Loader",
"description": "Versatile & Complete Cross-Platform CommonJS JavaScript Module, Package & Program Loader",
"homepage": "https://github.com/pinf/loader-js",

0 comments on commit 45f2a3f

Please sign in to comment.
Something went wrong with that request. Please try again.