mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-19 23:39:50 +02:00
Simplify things
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Code it the heart of every software project. We strive to make it better. Who if not us?
|
Code it the heart of every software project. We strive to make it better. Who if not us?
|
||||||
|
|
||||||
## Where is the code located?
|
## Where is the Code Located?
|
||||||
|
|
||||||
The core of Mermaid is located under `packages/mermaid/src`.
|
The core of Mermaid is located under `packages/mermaid/src`.
|
||||||
|
|
||||||
|
@@ -1,6 +1,23 @@
|
|||||||
# Mermaid Contributing Guide
|
# Mermaid Contributing Guide
|
||||||
|
|
||||||
## Get the Source Code
|
You decided to take part in the development? Welcome!
|
||||||
|
|
||||||
|
We were trying to make our guidelines for you as explicit and detailed as possible.
|
||||||
|
|
||||||
|
## Initial Setup
|
||||||
|
|
||||||
|
Initial setup consists of 3 main steps:
|
||||||
|
|
||||||
|
```mermaid-nocode
|
||||||
|
flowchart LR
|
||||||
|
source --> requirements --> setup
|
||||||
|
|
||||||
|
source[Get the source code]
|
||||||
|
requirements[Install the requirements]
|
||||||
|
setup[Install packages]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Get the Source Code
|
||||||
|
|
||||||
In GitHub, you first **fork** a repository when you are going to make changes and submit pull requests.
|
In GitHub, you first **fork** a repository when you are going to make changes and submit pull requests.
|
||||||
|
|
||||||
@@ -20,7 +37,7 @@ Once you have cloned the repository onto your development machine, change into t
|
|||||||
cd mermaid
|
cd mermaid
|
||||||
```
|
```
|
||||||
|
|
||||||
## Install Requirements
|
### Install Requirements
|
||||||
|
|
||||||
We support **development within Docker** environment along with **host setup**. You may choose it up to your preferences.
|
We support **development within Docker** environment along with **host setup**. You may choose it up to your preferences.
|
||||||
|
|
||||||
@@ -113,15 +130,14 @@ The basic steps to start contributing code and documentation are:
|
|||||||
```mermaid-nocode
|
```mermaid-nocode
|
||||||
flowchart TB
|
flowchart TB
|
||||||
|
|
||||||
fetch --> branch --> update --> submit --> review --> fetch
|
branch --> update --> submit --> review --> branch
|
||||||
fetch[Fetch development branch]
|
|
||||||
branch[Checkout a new branch]
|
branch[Checkout a new branch]
|
||||||
update[Make changes]
|
update[Make changes]
|
||||||
submit[Submit a PR]
|
submit[Submit a PR]
|
||||||
review[Review and merge]
|
review[Review and merge]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Fech latest code
|
## Checkout a New Branch
|
||||||
|
|
||||||
```tip
|
```tip
|
||||||
All new work should be based on the `develop` branch.
|
All new work should be based on the `develop` branch.
|
||||||
@@ -136,12 +152,9 @@ git checkout develop
|
|||||||
git fetch # or `git pull`
|
git fetch # or `git pull`
|
||||||
```
|
```
|
||||||
|
|
||||||
### Checkout new branch
|
|
||||||
|
|
||||||
Create a new branch for your work:
|
Create a new branch for your work:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git checkout develop # make sure you are on development branch
|
|
||||||
git checkout -b docs/2910_update-contributing-guidelines
|
git checkout -b docs/2910_update-contributing-guidelines
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -191,13 +204,6 @@ A bug described in issue 1123 that causes random ugly red text in multiple diagr
|
|||||||
`bug/1123_fix_random_ugly_red_text`
|
`bug/1123_fix_random_ugly_red_text`
|
||||||
```
|
```
|
||||||
|
|
||||||
### Make changes
|
|
||||||
|
|
||||||
Source code and the documentation are located [`packages/mermaid`]((https://github.com/mermaid-js/mermaid/tree/develop/packages/mermaid) folder.
|
|
||||||
You may need to update both, depending on your task.
|
|
||||||
|
|
||||||
Read our guides on [how to contribute to code](./code.md) and [how to contribute to documentation](./documentation.md).
|
|
||||||
|
|
||||||
## Contributing Code
|
## Contributing Code
|
||||||
|
|
||||||
Code it the heart of every software project. We strive to make it better. Who if not us?
|
Code it the heart of every software project. We strive to make it better. Who if not us?
|
||||||
@@ -344,7 +350,7 @@ DO NOT CHANGE FILES IN `/docs`
|
|||||||
The `docs` folder will be automatically generated when committing to `packages/mermaid/src/docs` and **should not** be edited manually.
|
The `docs` folder will be automatically generated when committing to `packages/mermaid/src/docs` and **should not** be edited manually.
|
||||||
```
|
```
|
||||||
|
|
||||||
It is located in the [`packages/mermaid/src/docs`](https://github.com/mermaid-js/mermaid/tree/develop/packages/mermaid/src/docs) folder. Just pick the right section and start typing.
|
Documentation is located in the [`packages/mermaid/src/docs`](https://github.com/mermaid-js/mermaid/tree/develop/packages/mermaid/src/docs) folder. Just pick the right section and start typing.
|
||||||
|
|
||||||
The contents of [mermaid.js.org](https://mermaid.js.org/) are based on the docs from the `master` branch. Updates committed to the `master` branch are reflected in the [Mermaid Docs](https://mermaid.js.org/) once published.
|
The contents of [mermaid.js.org](https://mermaid.js.org/) are based on the docs from the `master` branch. Updates committed to the `master` branch are reflected in the [Mermaid Docs](https://mermaid.js.org/) once published.
|
||||||
|
|
||||||
@@ -416,7 +422,7 @@ This is a danger alert
|
|||||||
```
|
```
|
||||||
````
|
````
|
||||||
|
|
||||||
### Documentation organization: Sidebar navigation
|
### Navigation
|
||||||
|
|
||||||
If you want to propose changes to how the documentation is _organized_, such as adding a new section or re-arranging or renaming a section, you must update the **sidebar navigation.**
|
If you want to propose changes to how the documentation is _organized_, such as adding a new section or re-arranging or renaming a section, you must update the **sidebar navigation.**
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@ DO NOT CHANGE FILES IN `/docs`
|
|||||||
The `docs` folder will be automatically generated when committing to `packages/mermaid/src/docs` and **should not** be edited manually.
|
The `docs` folder will be automatically generated when committing to `packages/mermaid/src/docs` and **should not** be edited manually.
|
||||||
```
|
```
|
||||||
|
|
||||||
It is located in the [`packages/mermaid/src/docs`](https://github.com/mermaid-js/mermaid/tree/develop/packages/mermaid/src/docs) folder. Just pick the right section and start typing.
|
Documentation is located in the [`packages/mermaid/src/docs`](https://github.com/mermaid-js/mermaid/tree/develop/packages/mermaid/src/docs) folder. Just pick the right section and start typing.
|
||||||
|
|
||||||
The contents of [mermaid.js.org](https://mermaid.js.org/) are based on the docs from the `master` branch. Updates committed to the `master` branch are reflected in the [Mermaid Docs](https://mermaid.js.org/) once published.
|
The contents of [mermaid.js.org](https://mermaid.js.org/) are based on the docs from the `master` branch. Updates committed to the `master` branch are reflected in the [Mermaid Docs](https://mermaid.js.org/) once published.
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ This is a danger alert
|
|||||||
```
|
```
|
||||||
````
|
````
|
||||||
|
|
||||||
## Documentation organization: Sidebar navigation
|
## Navigation
|
||||||
|
|
||||||
If you want to propose changes to how the documentation is _organized_, such as adding a new section or re-arranging or renaming a section, you must update the **sidebar navigation.**
|
If you want to propose changes to how the documentation is _organized_, such as adding a new section or re-arranging or renaming a section, you must update the **sidebar navigation.**
|
||||||
|
|
||||||
|
@@ -8,20 +8,17 @@ Once development is done we create a `release/vX.X.X` branch from `develop` for
|
|||||||
|
|
||||||
Once the release happens we add a tag to the `release` branch and merge it with `master`. The live product and on-line documentation are what is in the `master` branch.
|
Once the release happens we add a tag to the `release` branch and merge it with `master`. The live product and on-line documentation are what is in the `master` branch.
|
||||||
|
|
||||||
The basic steps to start contributing code and documentation are:
|
|
||||||
|
|
||||||
```mermaid-nocode
|
```mermaid-nocode
|
||||||
flowchart TB
|
flowchart TB
|
||||||
|
|
||||||
fetch --> branch --> update --> submit --> review --> fetch
|
branch --> update --> submit --> review --> branch
|
||||||
fetch[Fetch development branch]
|
|
||||||
branch[Checkout a new branch]
|
branch[Checkout a new branch]
|
||||||
update[Make changes]
|
update[Make changes]
|
||||||
submit[Submit a PR]
|
submit[Submit a PR]
|
||||||
review[Review and merge]
|
review[Review and merge]
|
||||||
```
|
```
|
||||||
|
|
||||||
## Fech latest code
|
## Checkout a New Branch
|
||||||
|
|
||||||
```tip
|
```tip
|
||||||
All new work should be based on the `develop` branch.
|
All new work should be based on the `develop` branch.
|
||||||
@@ -36,12 +33,9 @@ git checkout develop
|
|||||||
git fetch # or `git pull`
|
git fetch # or `git pull`
|
||||||
```
|
```
|
||||||
|
|
||||||
## Checkout new branch
|
|
||||||
|
|
||||||
Create a new branch for your work:
|
Create a new branch for your work:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git checkout develop # make sure you are on development branch
|
|
||||||
git checkout -b docs/2910_update-contributing-guidelines
|
git checkout -b docs/2910_update-contributing-guidelines
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user