Skip to content
This repository
Browse code

sub path; new version

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

0 notes on commit 45f2a3f

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