File tree 1 file changed +24
-5
lines changed
1 file changed +24
-5
lines changed Original file line number Diff line number Diff line change
1
+ const path = require ( "path" ) ;
1
2
const execSync = require ( "child_process" ) . execSync ;
2
3
3
- function exec ( cmd , env ) {
4
+ function exec ( cmd ) {
4
5
execSync ( cmd , { stdio : "inherit" , env : process . env } ) ;
5
6
}
6
7
7
- if ( process . env . CI ) {
8
- exec ( "lerna run build --stream --ignore react-router-website" ) ;
9
- } else {
10
- exec ( "lerna run build --stream" ) ;
8
+ const cwd = process . cwd ( ) ;
9
+
10
+ // Note: We don't currently have a build step for react-router-native.
11
+ // Instead, we use the source files directly.
12
+ [ "react-router" , "react-router-dom" , "react-router-config" ] . forEach (
13
+ packageName => {
14
+ console . log ( "Building %s ..." , packageName ) ;
15
+ process . chdir ( path . resolve ( __dirname , "../packages/" + packageName ) ) ;
16
+ exec ( "npm run build" ) ;
17
+ console . log ( ) ;
18
+ }
19
+ ) ;
20
+
21
+ if ( ! process . env . CI ) {
22
+ // Don't bother building the website now. Instead, build it in
23
+ // deploy-website.sh when we're on the "website" branch.
24
+ console . log ( "Building the website ..." ) ;
25
+ process . chdir ( path . resolve ( __dirname , "../website" ) ) ;
26
+ exec ( "npm run build" ) ;
27
+ console . log ( ) ;
11
28
}
29
+
30
+ process . chdir ( cwd ) ;
You can’t perform that action at this time.
0 commit comments