File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ You can customize the `web-codegen-scorer eval` script with the following flags:
6363
6464- ` --env=<path> ` (alias: ` --environment ` ): (** Required** ) Specifies the path from which to load the
6565 environment config.
66- - Example: ` web-codegen-scorer eval --env=foo/bar/my-env.js `
66+ - Example: ` web-codegen-scorer eval --env=foo/bar/my-env.mjs `
6767
6868- ` --model=<name> ` : Specifies the model to use when generating code. Defaults to the value of
6969 ` DEFAULT_MODEL_NAME ` .
Original file line number Diff line number Diff line change 11# Environment configuration reference
22
3- Environments are configured by creating a ` config.js ` that exposes an object that satisfies the
4- ` EnvironmentConfig ` interface. This document covers all options in ` EnvironmentConfig `
5- and what they do.
3+ Environments are configured by creating a ` config.mjs ` or ` config. js` file that exposes an object
4+ that satisfies the ` EnvironmentConfig ` interface. This document covers all options in
5+ ` EnvironmentConfig ` and what they do.
66
77## Required properties
88
Original file line number Diff line number Diff line change @@ -80,9 +80,11 @@ async function getAnswers(): Promise<InitOptions | null> {
8080 const configPath = await input ( {
8181 message : 'Where should we place the environment config file?' ,
8282 required : true ,
83- default : join ( generateId ( displayName ) || 'env' , 'config.js ' ) ,
83+ default : join ( generateId ( displayName ) || 'env' , 'config.mjs ' ) ,
8484 validate : ( value ) =>
85- value . endsWith ( '.js' ) ? true : 'Config must be a .js file' ,
85+ value . endsWith ( '.js' ) || value . endsWith ( '.mjs' )
86+ ? true
87+ : 'Config must be a .mjs or .js file' ,
8688 } ) ;
8789 const clientSideFramework = await input ( {
8890 message : 'What client-side framework will it be using?' ,
You can’t perform that action at this time.
0 commit comments