@@ -16,7 +16,7 @@ const exit = function exit() {
16
16
process . exit ( 1 )
17
17
}
18
18
19
- async function runCmd ( cmd , path , args = [ ] ) {
19
+ async function runCmd ( cmd , path , args = [ ] ) {
20
20
console . log ( chalk . underline ( `Running '${ chalk . green ( cmd ) } ' in ${ path } ` ) )
21
21
const executedCmd = await execa ( cmd , args , { cwd : path , shell : true , stdio : 'inherit' } )
22
22
@@ -33,7 +33,7 @@ async function runCmd (cmd, path, args = []) {
33
33
if ( ! project || ! version ) {
34
34
exit (
35
35
chalk . red ( 'Both project and version args are required.\n' ) ,
36
- chalk . yellow ( ' e.g., yarn gen --project ember --version 3.10.1' )
36
+ chalk . yellow ( ' e.g., yarn gen --project ember --version 3.10.1' ) ,
37
37
)
38
38
}
39
39
@@ -65,13 +65,15 @@ async function runCmd (cmd, path, args = []) {
65
65
await runCmd ( 'corepack' , projDirPath , [ 'pnpm' , 'install' ] )
66
66
}
67
67
68
-
69
68
if ( install ) {
70
69
await runCmd ( project === 'ember' ? 'yarn' : 'pnpm install' , projDirPath )
71
70
console . log ( '\n\n' )
72
71
}
73
72
74
- await runCmd ( project === 'ember' ? 'volta run yarn docs' : 'corepack pnpm run build:docs' , projDirPath )
73
+ await runCmd (
74
+ project === 'ember' ? 'volta run yarn docs' : 'corepack pnpm run build:docs' ,
75
+ projDirPath ,
76
+ )
75
77
76
78
let destination = `${ docsPath } /s3-docs/v${ version } /${ project } -docs.json`
77
79
ensureFileSync ( destination )
@@ -81,7 +83,7 @@ async function runCmd (cmd, path, args = []) {
81
83
82
84
const yuiDocFile = path . join (
83
85
projDirPath ,
84
- project === 'ember' ? 'docs/data.json' : 'packages/-ember-data/dist/docs/data.json'
86
+ project === 'ember' ? 'docs/data.json' : 'packages/-ember-data/dist/docs/data.json' ,
85
87
)
86
88
copyFileSync ( yuiDocFile , projYuiDocFile )
87
89
}
@@ -101,6 +103,6 @@ async function runCmd (cmd, path, args = []) {
101
103
project ,
102
104
'--version' ,
103
105
version ,
104
- '--no-sync'
106
+ '--no-sync' ,
105
107
] ) . stdout . pipe ( process . stdout )
106
108
} ) ( )
0 commit comments