File tree 1 file changed +31
-0
lines changed 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env node
2
+ // Copyright IBM Corp. 2017,2018. All Rights Reserved.
3
+ // Node module: @loopback /cli
4
+ // This file is licensed under the MIT License.
5
+ // License text available at https://opensource.org/licenses/MIT
6
+
7
+ /**
8
+ * This is an internal script to run `lerna` command with enviornment variable
9
+ * `LERNA_ROOT_PATH` set to the root directory of `loopback-next` monorepo
10
+ */
11
+ 'use strict' ;
12
+
13
+ const path = require ( 'path' ) ;
14
+ const lerna = require ( 'lerna' ) ;
15
+ const build = require ( '../packages/build' ) ;
16
+
17
+ function run ( argv , options ) {
18
+ const ls = new lerna . LsCommand (
19
+ null ,
20
+ { json : true , loglevel : 'silent' } ,
21
+ path . join ( __dirname , '..' ) ,
22
+ ) ;
23
+ const rootPath = ls . repository . rootPath ;
24
+
25
+ process . env . LERNA_ROOT_PATH = rootPath ;
26
+ const args = argv . slice ( 2 ) ;
27
+ return build . runCLI ( 'lerna/bin/lerna' , args , options ) ;
28
+ }
29
+
30
+ module . exports = run ;
31
+ if ( require . main === module ) run ( process . argv ) ;
You can’t perform that action at this time.
0 commit comments