Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 2 additions & 37 deletions packages/plugin-check/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,7 @@
# @sdeverywhere/plugin-check

## Example

Example `sde.config.js` file:

```js
import { checkPlugin } from '@sdeverywhere/plugin-check'
import { wasmPlugin } from '@sdeverywhere/plugin-wasm'
import { workerPlugin } from '@sdeverywhere/plugin-worker'

export async function config() {
return {
modelFiles: ['example.mdl'],

modelSpec: async () => {
return {
inputs: [{ varName: 'Y', defaultValue: 0, minValue: -10, maxValue: 10 }],
outputs: [{ varName: 'Z' }],
datFiles: []
}
},

plugins: [
// Generate a `generated-model.js` file containing the Wasm model
wasmPlugin(),

// Generate a `worker.js` file that runs the Wasm model in a worker
workerPlugin(),

// Run checks and comparison tests against the generated Wasm model
checkPlugin({
// There are no required properties; see `CheckPluginOptions` below
// for optional configuration
})
]
}
}
```
For examples of how to configure this plugin in an `sde.config.js` file, refer to the
["Usage"](../README.md#usage) section of the README.

## Initialization

Expand Down
26 changes: 2 additions & 24 deletions packages/plugin-config/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,7 @@
# @sdeverywhere/plugin-config

## Example

Example `sde.config.js` file:

```js
import { configProcessor } from '@sdeverywhere/plugin-config'

export async function config() {
return {
// Specify the Vensim model to read
modelFiles: ['example.mdl'],

// Read csv files from `config` directory and write to the recommended output
// directory structure. See `ConfigProcessorOptions` for more details.
modelSpec: configProcessor({
config: 'config'
}),

plugins: [
// ...
]
}
}
```
For examples of how to configure this plugin in an `sde.config.js` file, refer to the
["Usage"](../README.md#usage) section of the README.

## Initialization

Expand Down
47 changes: 2 additions & 45 deletions packages/plugin-deploy/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,7 @@
# @sdeverywhere/plugin-deploy

## Example

Example `sde.config.js` file:

```js
import { checkPlugin } from '@sdeverywhere/plugin-check'
import { deployPlugin } from '@sdeverywhere/plugin-deploy'
import { vitePlugin } from '@sdeverywhere/plugin-vite'
import { workerPlugin } from '@sdeverywhere/plugin-worker'

export async function config() {
return {
modelFiles: ['example.mdl'],

modelSpec: async () => {
return {
inputs: [{ varName: 'Y', defaultValue: 0, minValue: -10, maxValue: 10 }],
outputs: [{ varName: 'Z' }],
datFiles: []
}
},

plugins: [
// Generate a `worker.js` file that runs the model in a worker
workerPlugin(),

// Build or serve a web application using a provided Vite config file
vitePlugin({
// ...
})

// Run checks and comparison tests against the generated model
checkPlugin({
// ...
})

// Deploy the app and model-check report to GitHub Pages
deployPlugin({
// There are no required properties; see `DeployPluginOptions` below
// for optional configuration
})
]
}
}
```
For examples of how to configure this plugin in an `sde.config.js` file, refer to the
["Usage"](../README.md#usage) section of the README.

## Initialization

Expand Down
45 changes: 2 additions & 43 deletions packages/plugin-vite/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,7 @@
# @sdeverywhere/plugin-vite

## Example

Example `sde.config.js` file:

```js
import { vitePlugin } from '@sdeverywhere/plugin-vite'
import { wasmPlugin } from '@sdeverywhere/plugin-wasm'
import { workerPlugin } from '@sdeverywhere/plugin-worker'

export async function config() {
return {
modelFiles: ['example.mdl'],

modelSpec: async () => {
return {
inputs: [{ varName: 'Y', defaultValue: 0, minValue: -10, maxValue: 10 }],
outputs: [{ varName: 'Z' }],
datFiles: []
}
},

plugins: [
// Generate a `generated-model.js` file containing the Wasm model
wasmPlugin(),

// Generate a `worker.js` file that runs the Wasm model in a worker
workerPlugin(),

// Build or serve a web application using a provided Vite config file.
// See `VitePluginOptions` for the full set of configuration options.
vitePlugin({
name: 'app',
apply: {
development: 'serve'
},
config: {
configFile: 'app/vite.config.js'
}
})
]
}
}
```
For examples of how to configure this plugin in an `sde.config.js` file, refer to the
["Usage"](../README.md#usage) section of the README.

## Initialization

Expand Down
31 changes: 2 additions & 29 deletions packages/plugin-wasm/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,7 @@
# @sdeverywhere/plugin-wasm

## Example

Example `sde.config.js` file:

```js
import { wasmPlugin } from '@sdeverywhere/plugin-wasm'

export async function config() {
return {
modelFiles: ['example.mdl'],

modelSpec: async () => {
return {
inputs: [{ varName: 'Y', defaultValue: 0, minValue: -10, maxValue: 10 }],
outputs: [{ varName: 'Z' }],
datFiles: []
}
},

plugins: [
// Generate a `wasm-model.js` file containing the Wasm model
wasmPlugin({
// There are no required properties; see `WasmPluginOptions` below
// for optional configuration
})
]
}
}
```
For examples of how to configure this plugin in an `sde.config.js` file, refer to the
["Usage"](../README.md#usage) section of the README.

## Initialization

Expand Down
35 changes: 2 additions & 33 deletions packages/plugin-worker/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,7 @@
# @sdeverywhere/plugin-worker

## Example

Example `sde.config.js` file:

```js
import { wasmPlugin } from '@sdeverywhere/plugin-wasm'
import { workerPlugin } from '@sdeverywhere/plugin-worker'

export async function config() {
return {
modelFiles: ['example.mdl'],

modelSpec: async () => {
return {
inputs: [{ varName: 'Y', defaultValue: 0, minValue: -10, maxValue: 10 }],
outputs: [{ varName: 'Z' }],
datFiles: []
}
},

plugins: [
// Generate a `generated-model.js` file containing the Wasm model
wasmPlugin(),

// Generate a `worker.js` file that runs the Wasm model in a worker
workerPlugin({
// There are no required properties; see `WorkerPluginOptions` below
// for optional configuration
})
]
}
}
```
For examples of how to configure this plugin in an `sde.config.js` file, refer to the
["Usage"](../README.md#usage) section of the README.

## Initialization

Expand Down