Skip to content

Commit

Permalink
Better markdown and issue template config
Browse files Browse the repository at this point in the history
  • Loading branch information
Yash-Singh1 authored and MindaugasLaganeckas committed Dec 11, 2020
1 parent 15259ce commit 5588ed9
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 35 deletions.
19 changes: 11 additions & 8 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
4. See the error

**Expected behavior**
A clear and concise description of what you expected to happen.
Expand All @@ -24,15 +25,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ assignees: ''
---

## Help us help you!

You want an answer. Here are some ways to get it quicker:

* Use a clear and concise title.
* Try to pose a clear and concise question.
* Include as much, or as little, code as necessary.
Expand Down
12 changes: 8 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
## :bookmark_tabs: Summary

Brief description about the content of your PR.

Resolves #<your issue id here>

## :straight_ruler: Design Decisions

Describe the way your implementation works or what design decisions you made if applicable.

### :clipboard: Tasks
## :clipboard: Tasks

Make sure you
- [ ] :book: have read the [contribution guidelines](https://github.com/mermaid-js/mermaid/blob/develop/CONTRIBUTING.md)
- [ ] :computer: have added unit/e2e tests (if appropriate)
- [ ] :bookmark: targeted `master` branch

- [ ] :book: have read the [contribution guidelines](https://github.com/mermaid-js/mermaid-cli/blob/master/CONTRIBUTING.md)
- [ ] :computer: have added unit/e2e tests (if appropriate)
- [ ] :bookmark: targeted `master` branch
6 changes: 3 additions & 3 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Expand All @@ -20,7 +20,7 @@ Examples of unacceptable behavior by participants include:
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
- Other conduct that could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Expand All @@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting Mindaugas Laganeckas. Mindaugas will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing or otherwise, unacceptable behavior may be reported by contacting Mindaugas Laganeckas. Mindaugas will review and investigate all complaints and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality concerning the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Contributing
# Contributing

[fork]: /fork
[pr]: /compare
Expand All @@ -13,19 +13,19 @@ Please note that this project is released with a [Contributor Code of Conduct][c

1. [Fork][fork] and clone the repository
1. Configure and install the dependencies: `yarn install; source copy_modules.sh`
1. Create a new branch: `git checkout -b my-branch-name`. Make sure to give a good name to the branch. New features shall start with `feature/<branch name>`. Bug fixes shall start with `fix/<branch-name>`
1. Create a new branch: `git checkout -b my-branch-name`. Make sure to give a good name to the branch. New features shall start with `feature/<branch name>`. Bug fixes shall start with `fix/<branch-name>`
1. Make your change, add tests, and make sure the tests still pass
1. Push to your fork and [submit a pull request][pr]
1. Give yourself a high five, and wait for your pull request to be reviewed and merged.

Here are a few things you can do that will increase the likelihood of your pull request being accepted:
Here are a few things you can do that will increase the likelihood of your pull request is accepted:

- Follow the [style guide][style] which is using standard. Any linting errors should be shown when running `npm test`
- Write and update tests.
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, submit them as separate pull requests.
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).

Work in Progress pull request are also welcome to get feedback early on, or if there is something blocked you.
Work in the Progress pull requests are also welcome to get feedback early on, or if there is something blocking you.

## Resources

Expand Down
47 changes: 36 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,58 @@
### This is a command-line interface (CLI) for [mermaid](https://mermaid-js.github.io/). It takes a mermaid definition file as input and generates svg/png/pdf file as output.
# mermaid-cli

This is a command-line interface (CLI) for [mermaid](https://mermaid-js.github.io/). It takes a mermaid definition file as input and generates an svg/png/pdf file as output.

[![Join our Slack!](https://img.shields.io/static/v1?message=join%20chat&color=9cf&logo=slack&label=slack)](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE) [![This project is using Percy.io for visual regression testing.](https://percy.io/static/images/percy-badge.svg)](https://percy.io/Mermaid/mermaid-cli) ![Build, test and deploy](https://github.com/mermaid-js/mermaid-cli/workflows/Build,%20test%20and%20deploy%20mermaid-cli%20Docker%20image/badge.svg)

### Use Docker:
```docker pull minlag/mermaid-cli``` or e.g. version 8.8.0 ```docker pull minlag/mermaid-cli:8.8.0```
### Install locally
## Use Docker:

```sh
docker pull minlag/mermaid-cli
```

or e.g. version 8.8.0

```sh
docker pull minlag/mermaid-cli:8.8.0
```

## Install locally

Some people are [having issue](https://github.com/mermaidjs/mermaid.cli/issues/15) installing this tool globally. Installing it locally is an alternative solution:

```
yarn add @mermaid-js/mermaid-cli
./node_modules/.bin/mmdc -h
```

Or use NPM:

```
npm install @mermaid-js/mermaid-cli
./node_modules/.bin/mmdc -h
```
### Install globally
❗️ We do **NOT** recommend installing it globally because both YARN and NPM could fail to install a command line tool globally properly due to weird permission issues.

## Install globally

❗️ We do **NOT** recommend installing it globally because both YARN and NPM could fail to install a command-line tool globally properly due to weird permission issues.
`yarn global add @mermaid-js/mermaid-cli` or `npm install -g @mermaid-js/mermaid-cli`

### Examples

To see the latest options, please run the following command: `mmdc -h`

To convert Mermaid mmd diagram to an svg file, run this command: `mmdc -i input.mmd -o output.svg`

#### Piping from stdin
### Piping from stdin

You can also pipe input from stdin

```bash
```sh
# create_mermaid_output is an executable that sends mermaid output to stdout
create_mermaid_output | mmdc -o output.svg
```

```bash
```sh
cat << EOF | mmdc
sequenceDiagram
participant Alice
Expand All @@ -49,10 +69,15 @@ EOF
```

### Run with npx

[`npx`](https://www.npmjs.com/package/npx) is installed by default with NPM. It downloads and runs commands at the same time.
To use Mermaid CLI with npx, you need to use the `-p` flag because the package name is different than the command it installs (`mmdc`).
`npx -p @mermaid-js/mermaid-cli mmdc -h`
### Known issues

## Known issues

1. [Linux sandbox issue](docs/linux-sandbox-issue.md)
### For contributors

## For contributors

Contributions are welome. See the [contribution guide](CONTRIBUTING.md).
8 changes: 4 additions & 4 deletions building.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ Instead of creating a .npmrc file on your own you can also use npm login --regis

1. Do yarn

```
yarn
```sh
yarn
```

2. Run the bash script copy_modules.sh

3. Run the script like below:

```
node index.bundle.js -i test/state1.mmd
```sh
node index.bundle.js -i test/state1.mmd
```
2 changes: 1 addition & 1 deletion docs/linux-sandbox-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ Create a `puppeteer-config.json` file:

And when you invoke `mmdc`:

```
```sh
mmdc -p puppeteer-config.json ...
```

0 comments on commit 5588ed9

Please sign in to comment.