From 17312a023243d2d197f167d8d4d54398c5312d06 Mon Sep 17 00:00:00 2001 From: Nikolay Rozhkov Date: Fri, 5 Jan 2024 17:37:34 +0300 Subject: [PATCH] Cleanup --- .github/pull_request_template.md | 2 +- contrib.md | 78 ------------------- .../mermaid/src/docs/.vitepress/config.ts | 4 +- packages/mermaid/src/docs/contributing | 1 - run | 2 +- 5 files changed, 4 insertions(+), 83 deletions(-) delete mode 100644 contrib.md delete mode 120000 packages/mermaid/src/docs/contributing diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 4934163b5..f20204a71 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -14,5 +14,5 @@ Make sure you - [ ] :book: have read the [contribution guidelines](https://github.com/mermaid-js/mermaid/blob/develop/CONTRIBUTING.md) - [ ] :computer: have added necessary unit/e2e tests. -- [ ] :notebook: have added documentation. Make sure [`MERMAID_RELEASE_VERSION`](https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/docs/contribution/code.md#update-documentation) is used for all new features. +- [ ] :notebook: have added documentation. Make sure [`MERMAID_RELEASE_VERSION`](https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/docs/community/contributing.md#update-documentation) is used for all new features. - [ ] :bookmark: targeted `develop` branch diff --git a/contrib.md b/contrib.md deleted file mode 100644 index 843e9e622..000000000 --- a/contrib.md +++ /dev/null @@ -1,78 +0,0 @@ -FIXME: remove before merge, this is previous contributing.md - -## Contributing Guide - -Please read in detail about how to contribute documentation and code on the [Mermaid documentation site.](https://mermaid-js.github.io/mermaid/#/development) - -## Mermaid contribution cheat-sheet - -### Requirements - -- [volta](https://volta.sh/) to manage node versions. -- [Node.js](https://nodejs.org/en/). `volta install node` -- [pnpm](https://pnpm.io/) package manager. `volta install pnpm` - -### Development Installation - -If you don't have direct access to push to mermaid repositories, make a fork first. Then clone. Or clone directly from mermaid-js: - -```bash -git clone git@github.com:mermaid-js/mermaid.git -cd mermaid -``` - -Install required packages: - -```bash -## npx is required for first install as volta support for pnpm is not added yet. -npx pnpm install -pnpm test # run unit tests -pnpm dev # starts a dev server -``` - -Open in your browser after starting the dev server. -You can also duplicate the `example.html` file in `demos/dev`, rename it and add your own mermaid code to it. -That will be served at . - -#### Docker - -If you are using docker and docker-compose, you have self-documented `run` bash script, which is a convenient alias for docker-compose commands: - -```bash -./run install # npx pnpm install -./run test # pnpm test -``` - -### Testing - -```bash -## Run unit test -pnpm test -## Run unit test in watch mode -pnpm test:watch -## Run E2E test -pnpm e2e -## Debug E2E tests -pnpm dev -pnpm cypress:open # in another terminal -``` - -### Branch name format: - -```text - [feature | bug | chore | docs]/[issue number]_[short description using dashes ('-') or underscores ('_') instead of spaces] -``` - -eg: `feature/2945_state-diagram-new-arrow-florbs`, `bug/1123_fix_random_ugly_red_text` - -### Documentation - -Documentation is necessary for all non bugfix/refactoring changes. - -Only make changes to files that are in [`/packages/mermaid/src/docs`](packages/mermaid/src/docs) - -**_DO NOT CHANGE FILES IN `/docs` MANUALLY_** - -The `/docs` folder will be rebuilt and committed as part of a pre-commit hook. - -[Join our slack community if you want closer contact!](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE) diff --git a/packages/mermaid/src/docs/.vitepress/config.ts b/packages/mermaid/src/docs/.vitepress/config.ts index c7d29b277..710aa6b2d 100644 --- a/packages/mermaid/src/docs/.vitepress/config.ts +++ b/packages/mermaid/src/docs/.vitepress/config.ts @@ -84,8 +84,8 @@ function nav() { }, { text: 'Contributing', - link: '/contributing/intro', - activeMatch: '/contributing/', + link: '/comminuty/intro', + activeMatch: '/comminuty/', }, { text: 'Latest News', diff --git a/packages/mermaid/src/docs/contributing b/packages/mermaid/src/docs/contributing deleted file mode 120000 index 013cf3ce0..000000000 --- a/packages/mermaid/src/docs/contributing +++ /dev/null @@ -1 +0,0 @@ -community/ \ No newline at end of file diff --git a/run b/run index fbf437263..aeaccb474 100755 --- a/run +++ b/run @@ -50,7 +50,7 @@ Development quick start guide: $(bold ./$name pnpm install) # Install packages $(bold ./$name dev) # Run dev server with examples, open http://localhost:9000 -$(bold ./$name pnpm vitest) # Run watcher for unit tests +$(bold ./$name pnpm test) # Run watcher for unit tests $(bold ./$name cypress) # Run integration tests (after starting dev server) $(bold ./$name pnpm build) # Prepare it for production $(bold ./$name docs:dev) # Then add documentation, open http://localhost:3333