chore: Minor comments

Co-authored-by: Alois Klink <alois@aloisklink.com>
This commit is contained in:
Sidharth Vinod
2023-08-14 00:41:53 +05:30
parent 77a181978e
commit 2ede244da0
2 changed files with 4 additions and 2 deletions

View File

@@ -67,6 +67,8 @@ export const getBuildConfig = ({
output.format = 'iife'; output.format = 'iife';
output.splitting = false; output.splitting = false;
output.globalName = '__esbuild_esm_mermaid'; output.globalName = '__esbuild_esm_mermaid';
// Workaround for removing the .default access in esbuild IIFE.
// https://github.com/mermaid-js/mermaid/pull/4109#discussion_r1292317396
output.footer = { output.footer = {
js: 'globalThis.mermaid = globalThis.__esbuild_esm_mermaid.default;', js: 'globalThis.mermaid = globalThis.__esbuild_esm_mermaid.default;',
}; };

View File

@@ -7,7 +7,7 @@
# - `scripts/create-types-from-json-schema.mjs` # - `scripts/create-types-from-json-schema.mjs`
# Used to generate the `src/config.type.ts` TypeScript types for MermaidConfig # Used to generate the `src/config.type.ts` TypeScript types for MermaidConfig
# with the `json-schema-to-typescript` NPM package. # with the `json-schema-to-typescript` NPM package.
# - `.vite/jsonSchemaPlugin.ts` # - `.build/jsonSchema.ts`
# Used to generate the default values from the `default` keys in this # Used to generate the default values from the `default` keys in this
# JSON Schema using the `ajv` NPM package. # JSON Schema using the `ajv` NPM package.
# Non-JSON values, like functions or `undefined`, still need to be manually # Non-JSON values, like functions or `undefined`, still need to be manually
@@ -21,7 +21,7 @@
# - Use `meta:enum` to document enum values (from jsonschema2md) # - Use `meta:enum` to document enum values (from jsonschema2md)
# - Use `tsType` to override the TypeScript type (from json-schema-to-typescript) # - Use `tsType` to override the TypeScript type (from json-schema-to-typescript)
# - If adding a new object to `MermaidConfig` (e.g. a new diagram type), # - If adding a new object to `MermaidConfig` (e.g. a new diagram type),
# you may need to add it to `.vite/jsonSchemaPlugin.ts` and `src/docs.mts` # you may need to add it to `.build/jsonSchema.ts` and `src/docs.mts`
# to get the docs/default values to generate properly. # to get the docs/default values to generate properly.
$id: https://mermaid-js.github.io/schemas/config.schema.json $id: https://mermaid-js.github.io/schemas/config.schema.json
$schema: https://json-schema.org/draft/2019-09/schema $schema: https://json-schema.org/draft/2019-09/schema