File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 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');
2626var options = parseCommandLine ( [ {
2727 command : 'port' ,
2828 default : 8081 ,
29+ } , {
30+ command : 'root' ,
31+ description : 'add another root(s) to be used by the packager in this project' ,
2932} ] ) ;
3033
3134if ( ! options . projectRoots ) {
3235 options . projectRoots = [ path . resolve ( __dirname , '..' ) ] ;
3336}
3437
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+
3548console . log ( '\n' +
3649' ===============================================================\n' +
3750' | Running packager on port ' + options . port + '. \n' +
Original file line number Diff line number Diff line change 33ulimit -n 4096
44
55THIS_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