This repository was archived by the owner on Oct 19, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed
Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,7 @@ const locales = fs
88
99const [ basename ] = __filename . split ( '/' ) . reverse ( ) ;
1010
11- code = `
12- // WARNING: This file is generated by ${ basename } . Please do not modify it directly (including formatting).
11+ process . stdout . write ( `
12+ // WARNING: This code is generated by ${ basename } . Please do not modify it directly (including formatting).
1313export const locales: string[] = ${ JSON . stringify ( locales , undefined , 4 ) } ;
14- ` ;
15-
16- fs . writeFileSync ( __dirname + '/src/locales.ts' , Buffer . from ( code ) ) ;
14+ ` ) ;
Original file line number Diff line number Diff line change 2929 "clean" : " rimraf dist/* *.tsbuildinfo" ,
3030 "prebuild" : " npm run clean && npm run build:locales && npm run prettier:check" ,
3131 "build" : " npm run intl:compile && npm run build:esm && npm run build:cjs" ,
32- "build:locales" : " node ./build-locales.js && prettier --write ./src/locales.ts" ,
32+ "build:locales" : " node ./build-locales.js > ./src/locales.ts && prettier --write ./src/locales.ts" ,
3333 "build:esm" : " tsc --project tsconfig.esm.json && babel --config-file=./babel.esm.js src/ --extensions=.ts --out-dir=dist/esm/ --out-file-extension=.mjs" ,
3434 "build:cjs" : " tsc --project tsconfig.cjs.json && babel --config-file=./babel.cjs.js src/ --extensions=.ts --out-dir=dist/cjs/" ,
3535 "watch" : " tsc --watch --preserveWatchOutput --project ." ,
Original file line number Diff line number Diff line change 1- // WARNING: This file is generated by build-locales.js. Please do not modify it directly (including formatting).
1+ // WARNING: This code is generated by build-locales.js. Please do not modify it directly (including formatting).
22export const locales : string [ ] = [
33 'af' ,
44 'ar' ,
You can’t perform that action at this time.
0 commit comments