mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-13 12:29:42 +02:00
Merge branch '3061_making_a_monorepo' into sidv/3061_monorepo
* 3061_making_a_monorepo: Fixed paths for dev server Use of pnpm for the monorepo Use of pnpm for the monorepo
This commit is contained in:
@@ -14,8 +14,8 @@ const getEntryPointsAndExtensions = (format) => {
|
|||||||
return {
|
return {
|
||||||
entryPoints: {
|
entryPoints: {
|
||||||
mermaid: './src/mermaid',
|
mermaid: './src/mermaid',
|
||||||
e2e: 'cypress/platform/viewer.js',
|
e2e: '../../cypress/platform/viewer.js',
|
||||||
'bundle-test': 'cypress/platform/bundle-test.js',
|
'bundle-test': '../../cypress/platform/bundle-test.js',
|
||||||
},
|
},
|
||||||
outExtension: { '.js': format === 'iife' ? '.js' : '.esm.mjs' },
|
outExtension: { '.js': format === 'iife' ? '.js' : '.esm.mjs' },
|
||||||
};
|
};
|
||||||
|
17
README.md
17
README.md
@@ -1,5 +1,22 @@
|
|||||||
# mermaid [](https://travis-ci.org/mermaid-js/mermaid) [](https://www.npmjs.com/package/mermaid) [](https://coveralls.io/github/mermaid-js/mermaid?branch=master) [](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE)
|
# mermaid [](https://travis-ci.org/mermaid-js/mermaid) [](https://www.npmjs.com/package/mermaid) [](https://coveralls.io/github/mermaid-js/mermaid?branch=master) [](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE)
|
||||||
|
|
||||||
|
# Whoa, whats going on here?
|
||||||
|
|
||||||
|
We are transforming the Mermaid repository to a so called mono-repo. This is a part of the effort to decouple the diagrams from the core of mermaid. This will:
|
||||||
|
|
||||||
|
- Make it possible to select which diagrams to include on your site
|
||||||
|
- Open up for lazy loading
|
||||||
|
- Make it possible to add diagrams from outside of the Mermaid repository
|
||||||
|
- Separate the release flow between different diagrams and the Mermaid core
|
||||||
|
|
||||||
|
As such be aware of sime changes..
|
||||||
|
|
||||||
|
# We use pnpm now
|
||||||
|
|
||||||
|
# The source code has moved
|
||||||
|
|
||||||
|
It is now localted in the src forunder for respoective package located as subfoders in packages.
|
||||||
|
|
||||||
English | [简体中文](./README.zh-CN.md)
|
English | [简体中文](./README.zh-CN.md)
|
||||||
|
|
||||||
<img src="./img/header.png" alt="" />
|
<img src="./img/header.png" alt="" />
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import mermaid from '../../dist/mermaid.core';
|
import mermaid from '../../packages/mermaid/dist/mermaid.core';
|
||||||
|
|
||||||
let code = `flowchart LR
|
let code = `flowchart LR
|
||||||
Power_Supply --> Transmitter_A
|
Power_Supply --> Transmitter_A
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Base64 } from 'js-base64';
|
import { Base64 } from 'js-base64';
|
||||||
import mermaid2 from '../../src/mermaid';
|
import mermaid2 from '../../packages/mermaid/src/mermaid';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ##contentLoaded Callback function that is called when page is loaded. This functions fetches
|
* ##contentLoaded Callback function that is called when page is loaded. This functions fetches
|
||||||
|
@@ -1,9 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mermaid-monorepo",
|
"name": "mermaid-monorepo",
|
||||||
"private": true,
|
"private": true,
|
||||||
"workspaces": [
|
|
||||||
"packages/*"
|
|
||||||
],
|
|
||||||
"version": "9.2.0-rc1",
|
"version": "9.2.0-rc1",
|
||||||
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
|
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
|
||||||
"main": "dist/mermaid.core.mjs",
|
"main": "dist/mermaid.core.mjs",
|
||||||
|
@@ -14,8 +14,8 @@ const getEntryPointsAndExtensions = (format) => {
|
|||||||
return {
|
return {
|
||||||
entryPoints: {
|
entryPoints: {
|
||||||
mermaid: './src/mermaid',
|
mermaid: './src/mermaid',
|
||||||
e2e: 'cypress/platform/viewer.js',
|
e2e: './cypress/platform/viewer.js',
|
||||||
'bundle-test': 'cypress/platform/bundle-test.js',
|
'bundle-test': './cypress/platform/bundle-test.js',
|
||||||
},
|
},
|
||||||
outExtension: { '.js': format === 'iife' ? '.js' : '.esm.mjs' },
|
outExtension: { '.js': format === 'iife' ? '.js' : '.esm.mjs' },
|
||||||
};
|
};
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mermaid-js/mermaid-mindmap",
|
"name": "@mermaid-js/mermaid-mindmap",
|
||||||
"version": "9.2.0-rc1",
|
"version": "9.2.0-rc2",
|
||||||
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
|
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
|
||||||
"main": "dist/mermaid-mindmap.core.mjs",
|
"main": "dist/mermaid-mindmap.core.mjs",
|
||||||
"module": "dist/mermaid-mindmap.core.mjs",
|
"module": "dist/mermaid-mindmap.core.mjs",
|
||||||
@@ -59,7 +59,10 @@
|
|||||||
"mermaid": "*",
|
"mermaid": "*",
|
||||||
"non-layered-tidy-tree-layout": "^2.0.2"
|
"non-layered-tidy-tree-layout": "^2.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {
|
||||||
|
"concurrently": "^7.4.0",
|
||||||
|
"rimraf": "^3.0.2"
|
||||||
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"d3": "^7.0.0"
|
"d3": "^7.0.0"
|
||||||
},
|
},
|
||||||
|
@@ -14,8 +14,8 @@ const getEntryPointsAndExtensions = (format) => {
|
|||||||
return {
|
return {
|
||||||
entryPoints: {
|
entryPoints: {
|
||||||
mermaid: './src/mermaid',
|
mermaid: './src/mermaid',
|
||||||
e2e: 'cypress/platform/viewer.js',
|
e2e: '../../cypress/platform/viewer.js',
|
||||||
'bundle-test': 'cypress/platform/bundle-test.js',
|
'bundle-test': '../../cypress/platform/bundle-test.js',
|
||||||
},
|
},
|
||||||
outExtension: { '.js': format === 'iife' ? '.js' : '.esm.mjs' },
|
outExtension: { '.js': format === 'iife' ? '.js' : '.esm.mjs' },
|
||||||
};
|
};
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mermaid",
|
"name": "mermaid",
|
||||||
"version": "9.2.0-rc1",
|
"version": "9.2.0-rc2",
|
||||||
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
|
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
|
||||||
"main": "dist/mermaid.core.mjs",
|
"main": "dist/mermaid.core.mjs",
|
||||||
"module": "dist/mermaid.core.mjs",
|
"module": "dist/mermaid.core.mjs",
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
"dev": "node .esbuild/serve.cjs",
|
"dev": "node .esbuild/serve.cjs",
|
||||||
"docs:build": "ts-node-esm src/docs.mts",
|
"docs:build": "ts-node-esm src/docs.mts",
|
||||||
"docs:verify": "yarn docs:build --verify",
|
"docs:verify": "yarn docs:build --verify",
|
||||||
"postbuild": "documentation build src/mermaidAPI.ts src/config.ts src/defaultConfig.ts --shallow -f md --markdown-toc false > src/docs/Setup.md && prettier --write src/docs/Setup.md",
|
"todo-postbuild": "documentation build src/mermaidAPI.ts src/config.ts src/defaultConfig.ts --shallow -f md --markdown-toc false > src/docs/Setup.md && prettier --write src/docs/Setup.md",
|
||||||
"release": "yarn build",
|
"release": "yarn build",
|
||||||
"lint": "eslint --cache --ignore-path .gitignore . && yarn lint:jison && prettier --check .",
|
"lint": "eslint --cache --ignore-path .gitignore . && yarn lint:jison && prettier --check .",
|
||||||
"lint:fix": "eslint --fix --ignore-path .gitignore . && prettier --write .",
|
"lint:fix": "eslint --fix --ignore-path .gitignore . && prettier --write .",
|
||||||
@@ -45,7 +45,8 @@
|
|||||||
"test": "yarn lint && vitest run",
|
"test": "yarn lint && vitest run",
|
||||||
"test:watch": "vitest --coverage --watch",
|
"test:watch": "vitest --coverage --watch",
|
||||||
"prepublishOnly": "yarn build && yarn test",
|
"prepublishOnly": "yarn build && yarn test",
|
||||||
"prepare": "concurrently \"husky install\" \"yarn build\"",
|
"todo-prepare": "concurrently \"husky install\" \"yarn build\"",
|
||||||
|
"prepare": "concurrently \"yarn build\"",
|
||||||
"pre-commit": "lint-staged"
|
"pre-commit": "lint-staged"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
11371
pnpm-lock.yaml
generated
Normal file
11371
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
3
pnpm-workspace.yaml
Normal file
3
pnpm-workspace.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
packages:
|
||||||
|
# all packages in direct subdirs of packages/
|
||||||
|
- 'packages/*'
|
Reference in New Issue
Block a user