swap out npn bin with npx
npm bin was removed from npm in v9.0.0 refs LF-279 flag=none test plan: -run 'yarn build:all' and confirm that it succeeds qa risk: low Change-Id: I1fad82fd33a321ea4408260ed6917fa6b6e1e2c5 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318487 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Ed Schiebel <eschiebel@instructure.com> QA-Review: Ed Schiebel <eschiebel@instructure.com> Product-Review: Jake Oeding <jake.oeding@instructure.com>
This commit is contained in:
parent
af7ca2c318
commit
d89aa33d8d
|
@ -38,17 +38,14 @@ shell.exec('mkdir -p es')
|
|||
shell.exec('rm -rf lib/*')
|
||||
shell.exec('rm -rf es/*')
|
||||
shell.exec('scripts/installTranslations.js')
|
||||
const npm_bin_path = shell.exec('npm bin').trim()
|
||||
|
||||
shell.echo('Building CommonJS version')
|
||||
shell.exec(
|
||||
`JEST_WORKER_ID=1 ${npm_bin_path}/babel --out-dir lib src --ignore '**/__tests__' --extensions '.ts,.tsx,.js,.jsx'`
|
||||
"JEST_WORKER_ID=1 npx babel --out-dir lib src --ignore '**/__tests__' --extensions '.ts,.tsx,.js,.jsx'"
|
||||
)
|
||||
|
||||
shell.echo('Building ES Modules version')
|
||||
shell.exec(
|
||||
`${npm_bin_path}/babel --out-dir es src --ignore '**/__tests__' --extensions '.ts,.tsx,.js,.jsx'`
|
||||
)
|
||||
shell.exec("npx babel --out-dir es src --ignore '**/__tests__' --extensions '.ts,.tsx,.js,.jsx'")
|
||||
|
||||
shell.echo(`building pretranslated output in lib/translated in mulitple processes`)
|
||||
getTranslationList('canvas-rce')
|
||||
|
@ -56,7 +53,7 @@ getTranslationList('canvas-rce')
|
|||
const locales = translationFiles.map(tf => tf.split('.')[0])
|
||||
const processPromises = locales.map(locale => {
|
||||
return exec(
|
||||
`BUILD_LOCALE=${locale} ${npm_bin_path}/babel --out-dir lib/translated/${locale}/modules --ignore locales* src --extensions '.ts,.tsx,.js'`
|
||||
`BUILD_LOCALE=${locale} npx babel --out-dir lib/translated/${locale}/modules --ignore locales* src --extensions '.ts,.tsx,.js'`
|
||||
)
|
||||
})
|
||||
Promise.all(processPromises)
|
||||
|
|
Loading…
Reference in New Issue