From c8d3c3ac4fd5c6a75b8840326c1c10f0588aa340 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 9 Sep 2022 17:48:09 +0530 Subject: [PATCH] Correct name `umd` -> `iife` --- .esbuild/esbuild.cjs | 8 ++++---- .esbuild/serve.cjs | 4 ++-- .esbuild/util.cjs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.esbuild/esbuild.cjs b/.esbuild/esbuild.cjs index 776ae6eec..affd08ef9 100644 --- a/.esbuild/esbuild.cjs +++ b/.esbuild/esbuild.cjs @@ -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); diff --git a/.esbuild/serve.cjs b/.esbuild/serve.cjs index 13eba401d..c54ff1e9f 100644 --- a/.esbuild/serve.cjs +++ b/.esbuild/serve.cjs @@ -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 diff --git a/.esbuild/util.cjs b/.esbuild/util.cjs index 518bb723f..e136ff52e 100644 --- a/.esbuild/util.cjs +++ b/.esbuild/util.cjs @@ -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');