From a41a8028ede5b7ae93e3dff5a9fd1858f80f4f8c Mon Sep 17 00:00:00 2001 From: sidharthv96 Date: Mon, 24 Jan 2022 07:12:42 +0000 Subject: [PATCH 1/3] chore: update browsers list --- yarn.lock | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/yarn.lock b/yarn.lock index 81addab779..2840d6b427 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3306,15 +3306,10 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== -caniuse-lite@^1.0.30001280: - version "1.0.30001300" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001300.tgz" - integrity sha512-cVjiJHWGcNlJi8TZVKNMnvMid3Z3TTdDHmLDzlOdIiZq138Exvo0G+G0wTdVYolxKb4AYwC+38pxodiInVtJSA== - -caniuse-lite@^1.0.30001286: - version "1.0.30001300" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001300.tgz#11ab6c57d3eb6f964cba950401fd00a146786468" - integrity sha512-cVjiJHWGcNlJi8TZVKNMnvMid3Z3TTdDHmLDzlOdIiZq138Exvo0G+G0wTdVYolxKb4AYwC+38pxodiInVtJSA== +caniuse-lite@^1.0.30001280, caniuse-lite@^1.0.30001286: + version "1.0.30001301" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001301.tgz" + integrity sha512-csfD/GpHMqgEL3V3uIgosvh+SVIQvCh43SNu9HRbP1lnxkKm1kjDG4f32PP571JplkLjfS+mg2p1gxR7MYrrIA== caseless@~0.12.0: version "0.12.0" From 03446ce35c37024d7f1037f2991e713ccf00cfe9 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 22 Jun 2022 01:13:25 +0530 Subject: [PATCH 2/3] Re enable markdown & jsdoc linting. --- .eslintrc.json | 4 ++-- docs/development.md | 1 - docs/newDiagram.md | 26 ++++++++++++++------------ package.json | 2 +- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index dc5adb6f2e..9c755a0e2b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -15,9 +15,9 @@ }, "extends": [ "eslint:recommended", - //"plugin:jsdoc/recommended", + "plugin:jsdoc/recommended", "plugin:json/recommended", - // "plugin:markdown/recommended", + "plugin:markdown/recommended", "plugin:prettier/recommended" ], "plugins": ["html", "jest", "jsdoc", "json", "prettier"], diff --git a/docs/development.md b/docs/development.md index 69c87b589d..821c893e27 100644 --- a/docs/development.md +++ b/docs/development.md @@ -98,7 +98,6 @@ it('should render forks and joins', () => { ); cy.get('svg'); }); - ``` ### Any Questions or Suggestions? diff --git a/docs/newDiagram.md b/docs/newDiagram.md index b17a0d6423..01efdabe38 100644 --- a/docs/newDiagram.md +++ b/docs/newDiagram.md @@ -243,24 +243,26 @@ This function will in turn call a function *your diagram should provide* returni ```js const getStyles = (options) => - ` - .line { - stroke-width: 1; - stroke: ${options.lineColor}; - stroke-dasharray: 2; - } - // ... + ` + .line { + stroke-width: 1; + stroke: ${options.lineColor}; + stroke-dasharray: 2; + } + // ... + `; ``` Note that you need to provide your function to the main getStyles by adding it into the themes object in **src/styles.js** like in the xyzDiagram in the provided example: ```js const themes = { - flowchart, - 'flowchart-v2': flowchart, - sequence, - xyzDiagram - //... + flowchart, + 'flowchart-v2': flowchart, + sequence, + xyzDiagram, + //... +}; ``` The actual options and values for the colors are defined in **src/theme/theme-[xyz].js**. If you provide the options your diagram needs in the existing theme files then the theming will work smoothly without hiccups. diff --git a/package.json b/package.json index 8e03694fa5..105298128e 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "postbuild": "documentation build src/mermaidAPI.js src/config.js src/defaultConfig.js --shallow -f md --markdown-toc false > docs/Setup.md", "build:watch": "yarn build:development --watch", "release": "yarn build", - "lint": "eslint ./ --ext .js,.json,.html", + "lint": "eslint ./ --ext .js,.json,.html,.md", "lint:fix": "yarn lint --fix", "e2e:depr": "yarn lint && jest e2e --config e2e/jest.config.js", "cypress": "cypress run", From 68ddb090891e8b0f7a8c3b993bda33b6df744ed4 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 22 Jun 2022 01:13:58 +0530 Subject: [PATCH 3/3] Update links to `mermaid.live` --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- README.md | 22 +++++++++++----------- README.zh-CN.md | 4 ++-- docs/Configuration.md | 2 +- docs/README.md | 2 +- docs/n00b-gettingStarted.md | 4 ++-- docs/n00b-overview.md | 2 +- docs/usage.md | 4 ++-- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 74e02e6cb8..f8e453bd3a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -24,7 +24,7 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Code Sample** -If applicable, add the code sample or a link to the [live editor](https://mermaid-js.github.io/mermaid-live-editor). +If applicable, add the code sample or a link to the [live editor](https://mermaid.live). **Desktop (please complete the following information):** - OS: [e.g. iOS] diff --git a/README.md b/README.md index 5c2eefa8ce..4d86b6a439 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ But not having diagrams or docs ruins productivity and hurts organizational lear Mermaid addresses this problem by enabling users to create easily modifiable diagrams, it can also be made part of production scripts (and other pieces of code).

-Mermaid allows even non-programmers to easily create detailed diagrams through the [Mermaid Live Editor](https://mermaid-js.github.io/mermaid-live-editor/).
+Mermaid allows even non-programmers to easily create detailed diagrams through the [Mermaid Live Editor](https://mermaid.live/).
[Tutorials](./docs/Tutorials.md) has video tutorials. Use Mermaid with your favorite applications, check out the list of [Integrations and Usages of Mermaid](./docs/integrations.md). @@ -51,7 +51,7 @@ In our release process we rely heavily on visual regression tests using [applito __The following are some examples of the diagrams, charts and graphs that can be made using Mermaid. Click here jump into the [text syntax](https://mermaid-js.github.io/mermaid/#/n00b-syntaxReference).__ -### Flowchart [docs - live editor] +### Flowchart [docs - live editor] ``` flowchart LR @@ -71,7 +71,7 @@ C -->|Two| E[Result 2] ``` -### Sequence diagram [docs - live editor] +### Sequence diagram [docs - live editor] ``` sequenceDiagram @@ -96,7 +96,7 @@ John->>Bob: How about you? Bob-->>John: Jolly good! ``` -### Gantt chart [docs - live editor] +### Gantt chart [docs - live editor] ``` gantt @@ -119,7 +119,7 @@ gantt Parallel 4 : des6, after des4, 1d ``` -### Class diagram [docs - live editor] +### Class diagram [docs - live editor] ``` classDiagram @@ -158,7 +158,7 @@ class Class10 { } ``` -### State diagram [docs - live editor] +### State diagram [docs - live editor] ``` stateDiagram-v2 [*] --> Still @@ -178,24 +178,24 @@ Moving --> Crash Crash --> [*] ``` -### Pie chart [docs - live editor] +### Pie chart [docs - live editor] ``` pie "Dogs" : 386 -"Cats" : 85 +"Cats" : 85.9 "Rats" : 15 ``` ```mermaid pie "Dogs" : 386 -"Cats" : 85 +"Cats" : 85.9 "Rats" : 15 ``` -### Git graph [experimental - live editor] +### Git graph [experimental - live editor] -### User Journey diagram [docs - live editor] +### User Journey diagram [docs - live editor] ``` journey title My working day diff --git a/README.zh-CN.md b/README.zh-CN.md index 63a3ee4aa6..91297c3235 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -20,7 +20,7 @@ Mermaid 是一个基于 Javascript 的图表绘制工具,通过解析类 Markd 绘图和编写文档花费了开发者宝贵的开发时间,而且随着业务的变更,它很快就会过期。 但是如果缺少了图表或文档,对于生产力和团队新人的业务学习都会产生巨大的阻碍。
Mermaid 通过允许用户创建便于修改的图表来解决这一难题,它也可以作为生产脚本(或其他代码)的一部分。

-Mermaid 甚至能让非程序员也能通过 [Mermaid Live Editor](https://mermaid-js.github.io/mermaid-live-editor/) 轻松创建详细的图表。
+Mermaid 甚至能让非程序员也能通过 [Mermaid Live Editor](https://mermaid.live/) 轻松创建详细的图表。
你可以访问 [教程](./docs/Tutorials.md) 来查看 Live Editor 的视频教程,也可以查看 [Mermaid 的集成和使用](./docs/integrations.md) 这个清单来检查你的文档工具是否已经集成了 Mermaid 支持。 如果想要查看关于 Mermaid 更详细的介绍及基础使用方式,可以查看 [入门指引](./docs/n00b-overview.md), [用法](./docs/usage.md) 和 [教程](./docs/Tutorials.md). @@ -139,7 +139,7 @@ class Class10 { } ``` -### 状态图 [[docs - live editor] +### 状态图 [[docs - live editor] ``` stateDiagram-v2 diff --git a/docs/Configuration.md b/docs/Configuration.md index b121f3a06d..dcb50a5a97 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -5,7 +5,7 @@ Configuration is the second half of Mermaid, after deployment. Together Deployme This section will introduce the different methods of configuring of the behaviors and appearances of Mermaid Diagrams. The Following are the most commonly used methods, and are all tied to Mermaid [Deployment](./n00b-gettingStarted.md) methods. -## Configuration Section in the [Live Editor](https://mermaid-js.github.io/mermaid-live-editor). +## Configuration Section in the [Live Editor](https://mermaid.live/). ## The `initialize()` call, for when Mermaid is called via an API, or through a