Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ npm install -g @asyncapi/cli
Generate using CLI

```bash
asyncapi generate fromTemplate <asyncapi.yaml> @asyncapi/markdown-template@1.2.1
asyncapi generate fromTemplate <asyncapi.yaml> @asyncapi/markdown-template@2.0.0
```

You can replace `<asyncapi.yaml>` with local path or URL pointing to [any AsyncAPI document](https://raw.githubusercontent.com/asyncapi/spec/master/examples/streetlights-kafka-asyncapi.yml).
Expand All @@ -44,12 +44,7 @@ Look into [Releases](/asyncapi/markdown-template/releases) of this template to p

## Development

1. Make sure you have the latest generator installed `npm install -g @asyncapi/generator`.
2. Modify the template or it's reusable parts. Adjust `test/spec/asyncapi.yml` to have more complexity if needed.
3. Generate output with watcher enabled by running the command `npm run dev`.
4. Check generated markdown file located in `./test/output/asyncapi.md`.

Parameters for the template are defined in `package.json`.
The best and most reliable way of developing template is by using Generator's build in CLI. Clone Generator and follow official [development guide](https://github.com/asyncapi/generator/blob/master/Development.md#manually-testing-with-test-templates).

## Contributors ✨

Expand Down
9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,8 @@
"homepage": "https://github.com/asyncapi/markdown-template#readme",
"scripts": {
"start": "npm run test:generator:v2",
"test": "npm run test:library && npm run test:generator",
"test": "npm run test:library",
"test:library": "jest --coverage",
"test:generator": "npm run test:generator:v2 && npm run test:generator:v3",
"test:generator:v2": "asyncapi generate fromTemplate ./test/spec/asyncapi_v2.yml ./ -o test/output --force-write",
"test:generator:v3": "asyncapi generate fromTemplate ./test/spec/asyncapi_v3.yml ./ -o test/output --force-write",
"dev": "asyncapi generate fromTemplate ./test/spec/asyncapi_v2.yml ./ -o test/output --force-write --watch-template",
"lint": "eslint --max-warnings 0 --config \".eslintrc\" \".\"",
"lint:fix": "eslint --max-warnings 0 --config \".eslintrc\" \".\" --fix",
"generate:assets": "npm run generate:readme:toc",
Expand All @@ -41,7 +37,6 @@
"yaml": "^1.10.2"
},
"devDependencies": {
"@asyncapi/cli": "^3.1.1",
"@asyncapi/parser": "^3.1.0",
"@babel/preset-env": "^7.15.8",
"@babel/preset-react": "^7.14.5",
Expand All @@ -58,7 +53,7 @@
"generator": {
"renderer": "react",
"apiVersion": "v3",
"generator": ">=1.15.0 <2.0.0",
"generator": ">=3.0.0 <4.0.0",
"parameters": {
"frontMatter": {
"description": "The name of a JSON or YAML formatted file containing values to provide the YAML frontmatter for static-site or documentation generators. The file may contain {{title}} and {{version}} replaceable tags.",
Expand Down