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:
63
63
64
64
- ` --env=<path> ` (alias: ` --environment ` ): (** Required** ) Specifies the path from which to load the
65
65
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 `
67
67
68
68
- ` --model=<name> ` : Specifies the model to use when generating code. Defaults to the value of
69
69
` DEFAULT_MODEL_NAME ` .
Original file line number Diff line number Diff line change 1
1
# Environment configuration reference
2
2
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.
6
6
7
7
## Required properties
8
8
Original file line number Diff line number Diff line change @@ -80,9 +80,11 @@ async function getAnswers(): Promise<InitOptions | null> {
80
80
const configPath = await input ( {
81
81
message : 'Where should we place the environment config file?' ,
82
82
required : true ,
83
- default : join ( generateId ( displayName ) || 'env' , 'config.js ' ) ,
83
+ default : join ( generateId ( displayName ) || 'env' , 'config.mjs ' ) ,
84
84
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' ,
86
88
} ) ;
87
89
const clientSideFramework = await input ( {
88
90
message : 'What client-side framework will it be using?' ,
You can’t perform that action at this time.
0 commit comments