Commit 8f68996 1 parent c88a1cd commit 8f68996 Copy full SHA for 8f68996
File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,25 @@ var parseCommandLine = require('./parseCommandLine.js');
26
26
var options = parseCommandLine ( [ {
27
27
command : 'port' ,
28
28
default : 8081 ,
29
+ } , {
30
+ command : 'root' ,
31
+ description : 'add another root(s) to be used by the packager in this project' ,
29
32
} ] ) ;
30
33
31
34
if ( ! options . projectRoots ) {
32
35
options . projectRoots = [ path . resolve ( __dirname , '..' ) ] ;
33
36
}
34
37
38
+ if ( options . root ) {
39
+ if ( typeof options . root === 'string' ) {
40
+ options . projectRoots . push ( path . resolve ( options . root ) ) ;
41
+ } else {
42
+ options . root . forEach ( function ( root ) {
43
+ options . projectRoots . push ( path . resolve ( root ) ) ;
44
+ } ) ;
45
+ }
46
+ }
47
+
35
48
console . log ( '\n' +
36
49
' ===============================================================\n' +
37
50
' | Running packager on port ' + options . port + '. \n' +
Original file line number Diff line number Diff line change 3
3
ulimit -n 4096
4
4
5
5
THIS_DIR=$( dirname " $0 " )
6
- node $THIS_DIR /packager.js
6
+ node $THIS_DIR /packager.js " $@ "
You can’t perform that action at this time.
0 commit comments