@sdeverywhere/build / UserConfig
The sde configuration as defined by the user, either inline or in a sde.config.js
file.
Optional
rootDir: string
The project root directory. If undefined, the current directory is assumed to be the project root. This directory should contain all the model and config files referenced during the build process.
Optional
prepDir: string
The directory used to prepare the model. If undefined, an 'sde-prep'
directory will be created under the resolved rootDir
.
modelFiles: string
[]
The mdl files to be built (must provide one or more).
Optional
modelInputPaths: string
[]
Paths to files that are considered to be inputs to the model build process.
These can be paths to files or glob patterns (relative to the project directory).
If left undefined, this will resolve to the modelFiles
array.
Optional
watchPaths: string
[]
Paths to files that when changed will trigger a rebuild in watch mode. These
can be paths to files or glob patterns (relative to the project directory).
If left undefined, this will resolve to the modelFiles
array.
Optional
genFormat: "js"
| "c"
The code format to generate. If 'js', the model will be compiled to a JavaScript file. If 'c', the model will be compiled to a C file (in which case an additional plugin will be needed to convert the C code to a WebAssembly module). If undefined, defaults to 'js'.
Optional
outListingFile: string
If defined, the build process will write a JSON file to the provided path that lists
all dimensions and variables in the model. This can be an absolute path, or if it
is a relative path it will be resolved relative to the rootDir
for the project.
Optional
plugins: Plugin
[]
The array of plugins that are used to customize the build process. These will be executed in the order defined here.
modelSpec: (context
: BuildContext
) => Promise
<ModelSpec
>
(context
): Promise
<ModelSpec
>
Called before the "generate model" steps are performed.
You must implement this function so that the generated model is configured with the desired inputs and outputs.
Name | Type |
---|---|
context |
BuildContext |
Promise
<ModelSpec
>
A ModelSpec
that defines the model inputs and outputs.