File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 120120*/
121121const _: ${ typename } = ${ JSON . stringify ( o ) } ;
122122 ` ;
123- writeSource (
123+ await writeSource (
124124 `gw2api/typeguards/failures/failure_${ ( '' + failures ) . padStart (
125125 3 ,
126126 '0' ,
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ async function run() {
9494 PROFESSIONS [ id ] = elite_specs ;
9595 }
9696
97- writeSource (
97+ await writeSource (
9898 'data/professions.ts' ,
9999 `
100100export type ProfessionTypes = ${ as_type ( PROFESSION_IDS ) } ;
@@ -108,7 +108,7 @@ export default PROFESSIONS;
108108` ,
109109 ) ;
110110
111- writeSource (
111+ await writeSource (
112112 'i18n/professions.ts' ,
113113 `
114114import type { Translation } from '.';
@@ -127,7 +127,7 @@ export default TRANSLATIONS_PROFESSIONS;
127127 return [ p . id , [ ...p . specializations ] . sort ( ( a , b ) => a - b ) ] ;
128128 } ) ,
129129 ) ;
130- writeSource (
130+ await writeSource (
131131 'data/specializations.ts' ,
132132 `
133133import type { ProfessionTypes } from './professions';
@@ -151,7 +151,7 @@ export default SPECIALIZATIONS;
151151 TRANSLATIONS_RACES [ id ] = translations ;
152152 }
153153
154- writeSource (
154+ await writeSource (
155155 'data/races.ts' ,
156156 `
157157export type RacesTypes = ${ as_type ( RACE_IDS ) } ;
@@ -160,7 +160,7 @@ const RACES: RacesTypes[] = ${JSON.stringify(RACE_IDS.sort())};
160160export default RACES;` ,
161161 ) ;
162162
163- writeSource (
163+ await writeSource (
164164 'i18n/races.ts' ,
165165 `
166166import type { Translation } from '.';
@@ -194,7 +194,7 @@ export default TRANSLATIONS_RACES;
194194 }
195195 if ( skill . slot ) skill_slots . add ( skill . slot ) ;
196196 }
197- writeSource (
197+ await writeSource (
198198 'gw2api/types/skills/enums.ts' ,
199199 `
200200export type GW2ApiSkillCategory = ${ as_type ( skill_categories ) } ;
Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ export async function initPrettier() {
1818 url . fileURLToPath ( import . meta. url ) ,
1919 ) ;
2020}
21- export function writeSource ( filepath , content ) {
21+ export async function writeSource ( filepath , content ) {
2222 filepath = path . join ( 'src' , filepath ) ;
23- let prettied = prettier . format ( AUTOGENERATE_HEADER + content , {
23+ let prettied = await prettier . format ( AUTOGENERATE_HEADER + content , {
2424 ...prettier_options ,
2525 filepath,
2626 } ) ;
You can’t perform that action at this time.
0 commit comments