mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
chore: Add defaultOptions to server
This commit is contained in:
parent
b68f45ef59
commit
53669efaf8
@ -4,18 +4,30 @@ import cors from 'cors';
|
|||||||
import { getBuildConfig } from './util.js';
|
import { getBuildConfig } from './util.js';
|
||||||
import { context } from 'esbuild';
|
import { context } from 'esbuild';
|
||||||
import chokidar from 'chokidar';
|
import chokidar from 'chokidar';
|
||||||
|
import { defaultOptions } from './util';
|
||||||
|
|
||||||
const mermaidCtx = await context(
|
const mermaidCtx = await context(
|
||||||
getBuildConfig({ minify: false, core: false, entryName: 'mermaid' })
|
getBuildConfig({ ...defaultOptions, minify: false, core: false, entryName: 'mermaid' })
|
||||||
);
|
);
|
||||||
const mermaidIIFECtx = await context(
|
const mermaidIIFECtx = await context(
|
||||||
getBuildConfig({ minify: false, core: false, entryName: 'mermaid', format: 'iife' })
|
getBuildConfig({
|
||||||
|
...defaultOptions,
|
||||||
|
minify: false,
|
||||||
|
core: false,
|
||||||
|
entryName: 'mermaid',
|
||||||
|
format: 'iife',
|
||||||
|
})
|
||||||
);
|
);
|
||||||
const externalCtx = await context(
|
const externalCtx = await context(
|
||||||
getBuildConfig({ minify: false, core: false, entryName: 'mermaid-example-diagram' })
|
getBuildConfig({
|
||||||
|
...defaultOptions,
|
||||||
|
minify: false,
|
||||||
|
core: false,
|
||||||
|
entryName: 'mermaid-example-diagram',
|
||||||
|
})
|
||||||
);
|
);
|
||||||
const zenumlCtx = await context(
|
const zenumlCtx = await context(
|
||||||
getBuildConfig({ minify: false, core: false, entryName: 'mermaid-zenuml' })
|
getBuildConfig({ ...defaultOptions, minify: false, core: false, entryName: 'mermaid-zenuml' })
|
||||||
);
|
);
|
||||||
const contexts = [mermaidCtx, mermaidIIFECtx, externalCtx, zenumlCtx];
|
const contexts = [mermaidCtx, mermaidIIFECtx, externalCtx, zenumlCtx];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user