diff --git a/packages/plugin-check/docs/index.md b/packages/plugin-check/docs/index.md index 488a9a84..db24c0cb 100644 --- a/packages/plugin-check/docs/index.md +++ b/packages/plugin-check/docs/index.md @@ -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 diff --git a/packages/plugin-config/docs/index.md b/packages/plugin-config/docs/index.md index 6580e743..95037561 100644 --- a/packages/plugin-config/docs/index.md +++ b/packages/plugin-config/docs/index.md @@ -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 diff --git a/packages/plugin-deploy/docs/index.md b/packages/plugin-deploy/docs/index.md index bd2c2b88..00b54d27 100644 --- a/packages/plugin-deploy/docs/index.md +++ b/packages/plugin-deploy/docs/index.md @@ -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 diff --git a/packages/plugin-vite/docs/index.md b/packages/plugin-vite/docs/index.md index 7e56b93d..8cd5245f 100644 --- a/packages/plugin-vite/docs/index.md +++ b/packages/plugin-vite/docs/index.md @@ -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 diff --git a/packages/plugin-wasm/docs/index.md b/packages/plugin-wasm/docs/index.md index ef724706..79893353 100644 --- a/packages/plugin-wasm/docs/index.md +++ b/packages/plugin-wasm/docs/index.md @@ -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 diff --git a/packages/plugin-worker/docs/index.md b/packages/plugin-worker/docs/index.md index 10073b9a..ddb3f1d8 100644 --- a/packages/plugin-worker/docs/index.md +++ b/packages/plugin-worker/docs/index.md @@ -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