mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
Correct name umd
-> iife
This commit is contained in:
parent
1029ce4527
commit
c8d3c3ac4f
@ -1,4 +1,4 @@
|
||||
const { esmBuild, umdBuild } = require('./util.cjs');
|
||||
const { esmBuild, iifeBuild } = require('./util.cjs');
|
||||
const { build } = require('esbuild');
|
||||
|
||||
const handler = (e) => {
|
||||
@ -8,14 +8,14 @@ const handler = (e) => {
|
||||
const watch = process.argv.includes('--watch');
|
||||
|
||||
// mermaid.js
|
||||
build(umdBuild({ minify: false, watch })).catch(handler);
|
||||
build(iifeBuild({ minify: false, watch })).catch(handler);
|
||||
// mermaid.esm.mjs
|
||||
build(esmBuild({ minify: false, watch })).catch(handler);
|
||||
|
||||
// mermaid.core.js
|
||||
build(umdBuild({ minify: false, core: true })).catch(handler);
|
||||
build(iifeBuild({ minify: false, core: true })).catch(handler);
|
||||
|
||||
// mermaid.min.js
|
||||
build(esmBuild()).catch(handler);
|
||||
// mermaid.esm.min.mjs
|
||||
build(umdBuild()).catch(handler);
|
||||
build(iifeBuild()).catch(handler);
|
||||
|
@ -1,7 +1,7 @@
|
||||
const esbuild = require('esbuild');
|
||||
const http = require('http');
|
||||
const path = require('path');
|
||||
const { umdBuild } = require('./util.cjs');
|
||||
const { iifeBuild } = require('./util.cjs');
|
||||
|
||||
// Start esbuild's server on a random local port
|
||||
esbuild
|
||||
@ -9,7 +9,7 @@ esbuild
|
||||
{
|
||||
servedir: path.join(__dirname, '..'),
|
||||
},
|
||||
umdBuild({ minify: false })
|
||||
iifeBuild({ minify: false })
|
||||
)
|
||||
.then((result) => {
|
||||
// The result tells us where esbuild's local server is
|
||||
|
@ -42,7 +42,7 @@ exports.esmBuild = (override = { minify: true }) => {
|
||||
* @param {Options & { core?: boolean }} override
|
||||
* @returns {Options}
|
||||
*/
|
||||
exports.umdBuild = (override = { minify: true, core: false }) => {
|
||||
exports.iifeBuild = (override = { minify: true, core: false }) => {
|
||||
const core = override.core;
|
||||
if (core && override.minify) {
|
||||
throw new Error('Cannot minify core build');
|
||||
|
Loading…
x
Reference in New Issue
Block a user