Commit Graph

89 Commits

Author SHA1 Message Date
Sidharth Vinod
9cbebbb8a0 chore: Split chunks into folders 2023-08-14 08:35:49 +05:30
Sidharth Vinod
e26d987c4e chore: Split chunks into folders 2023-08-14 08:34:11 +05:30
Sidharth Vinod
53669efaf8 chore: Add defaultOptions to server 2023-08-14 08:30:51 +05:30
Sidharth Vinod
b68f45ef59 chore: Split chunks into folders 2023-08-14 08:27:14 +05:30
Sidharth Vinod
a1541aa6f5 chore: Split chunks into folders 2023-08-14 08:14:43 +05:30
Sidharth Vinod
5f3c4fccaf chore: Add tiny bundle
Excludes elk and mindmap at build time
2023-08-14 07:34:16 +05:30
Sidharth Vinod
2ede244da0 chore: Minor comments
Co-authored-by: Alois Klink <alois@aloisklink.com>
2023-08-14 00:55:48 +05:30
Sidharth Vinod
77a181978e chore: Replace Date.now with console.time
Co-authored-by: Alois Klink <alois@aloisklink.com>
2023-08-14 00:55:48 +05:30
Sidharth Vinod
170bbce0d3 chore: Build at start 2023-08-14 00:55:41 +05:30
Sidharth Vinod
fc99d9be41 chore: Add build times to live reload 2023-08-14 00:55:41 +05:30
Sidharth Vinod
9fb9bed806 chore: Add live-reload 2023-08-14 00:55:34 +05:30
Sidharth Vinod
da7ff777d1 chore: Add esbuild (Breaking change)
mermaid.min.js and mermaid.js will now be IIFE instead of UMD.
2023-08-14 00:52:45 +05:30
Sidharth Vinod
d9406585c8 remove esbuild 2022-09-23 10:50:58 +05:30
Sidharth Vinod
36ad4a847e vite Server 2022-09-21 00:47:04 +05:30
Sidharth Vinod
5791fc9a4d Cleanup 2022-09-21 00:15:52 +05:30
Sidharth Vinod
d7093c4891 Merge branch 'sidv/vitestEsbuildOnly' into sidv/viteVitest
* sidv/vitestEsbuildOnly:
  Merge vitest & esbuild
  Merge vitest
  Revert "fix(test): No esm exports"
  fix(test): No esm exports
  unify Jison tranformers
  Fix jest
  fix: imports in HTML
  Revert "Add diagramAPI to outfile"
  Add `type: module` to package.json
  Update mermaid version
  Fix ports
  Fix mjs resolution
  Fix import errors
  fix: conflict
  ESM test
  Add local jison linting
  chore: cleanup
  chore: Remove webpack & babel dependencies
  feat: Remove webpack
2022-09-21 00:15:11 +05:30
Sidharth Vinod
e0aae3e31f Revert "fix(test): No esm exports"
This reverts commit c21c026749.
2022-09-20 23:12:51 +05:30
Sidharth Vinod
c21c026749 fix(test): No esm exports 2022-09-20 23:10:05 +05:30
Sidharth Vinod
dab43da202 fix: imports in HTML 2022-09-20 22:13:49 +05:30
Sidharth Vinod
0a944a5de1 Revert "Add diagramAPI to outfile"
This reverts commit a87abc00c6.
2022-09-20 21:54:32 +05:30
Sidharth Vinod
bb824f1147 Merge branch 'sidv/esbuildFail' into sidv/webpackBabelRemoval
* sidv/esbuildFail:
  Update mermaid version
  Fix ports
  Fix mjs resolution
  Fix import errors
  fix: conflict
2022-09-20 21:31:42 +05:30
Sidharth Vinod
827b3d47b7 Add type: module to package.json 2022-09-20 21:14:56 +05:30
Sidharth Vinod
7bf877d820 fix jison generation 2022-09-19 12:49:24 +05:30
Sidharth Vinod
811f838a2d Fix ports 2022-09-14 14:33:38 +05:30
Sidharth Vinod
b4af820ed1 Fix mjs resolution 2022-09-14 12:04:22 +05:30
Sidharth Vinod
ac629c91d6 Fix import errors 2022-09-14 12:01:47 +05:30
Sidharth Vinod
5434cfc89d feat: Remove webpack 2022-09-13 11:26:44 +05:30
Sidharth Vinod
a87abc00c6 Add diagramAPI to outfile 2022-09-13 11:25:14 +05:30
Alois Klink
3f76eb0ac2 docs: update mermaid.core.* JSDoc
Fix typo and add that `mermaid.core.*` is compatible with Vite.
2022-09-12 06:21:57 +01:00
Alois Klink
37aaca0090 build: convert core build to unbundled ESM
The `mermaid.core.js` build was previously a UMD build that did not
have `node_modules` bundled.

This was designed for users to add `mermaid` to their own apps,
then bundle with Webpack/ESBuild.
Hence the bundle test in `cypress/platform/bundle-test.js`.

As ESBuild does not support UMD, I've switched the `mermaid.core.js`
to instead use ESM, as Mermaid now requires ESM
(due to d3 requiring ESM). All modern bundlers also support ESM.
2022-09-11 21:56:30 +01:00
Alois Klink
48a899f7a9 build: remove main function from .jison files
When converting a `.jison` file into a CommonJS module,
jison by default adds a main() function that calls `require("fs");`

Even though the main function is never used in the browser,
because `fs` is a Node.JS only module, this causes some esbuild issues.

To disable this, we can just set an empty main to the jison generator.
2022-09-11 21:56:26 +01:00
Sidharth Vinod
5148acb20f Specify iife format 2022-09-09 17:49:11 +05:30
Sidharth Vinod
c8d3c3ac4f Correct name umd -> iife 2022-09-09 17:48:09 +05:30
Sidharth Vinod
1029ce4527 fix: Add .core build. 2022-09-09 17:32:13 +05:30
Sidharth Vinod
3a179170bb Surface jison errors
Co-authored-by: Alois Klink <alois@aloisklink.com>
2022-09-06 20:23:46 +05:30
Sidharth Vinod
99923fcd0f Test - esbuild 2022-09-02 11:08:14 +05:30
Sidharth Vinod
6be05e9948 Esbuild with types 2022-09-02 00:34:03 +05:30
Sidharth Vinod
fe3bb0b6c0 Typescript 2022-09-01 20:41:31 +05:30
Sidharth Vinod
d67e2723c6 Serve 2022-09-01 13:38:02 +05:30