From 04d960a32f80669b36a948314bf74b755a82f680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=20M=C3=A9ndez?= Date: Tue, 31 Mar 2020 14:33:48 +0200 Subject: [PATCH] feat: Migrate to the new template structure (#3) * feat: Migrate to the new template structure * Add README --- .partials/content.md | 5 ----- README.md | 14 ++++++++++++++ {.filters => filters}/all.js | 0 {.partials => partials}/channel.md | 0 {.partials => partials}/channels.md | 0 partials/content.md | 5 +++++ {.partials => partials}/info.md | 0 {.partials => partials}/message.md | 0 {.partials => partials}/operation.md | 0 {.partials => partials}/parameters.md | 0 {.partials => partials}/schema-prop.md | 0 {.partials => partials}/schema.md | 0 {.partials => partials}/tags.md | 0 asyncapi.md => template/asyncapi.md | 2 +- 14 files changed, 20 insertions(+), 6 deletions(-) delete mode 100644 .partials/content.md create mode 100644 README.md rename {.filters => filters}/all.js (100%) rename {.partials => partials}/channel.md (100%) rename {.partials => partials}/channels.md (100%) create mode 100644 partials/content.md rename {.partials => partials}/info.md (100%) rename {.partials => partials}/message.md (100%) rename {.partials => partials}/operation.md (100%) rename {.partials => partials}/parameters.md (100%) rename {.partials => partials}/schema-prop.md (100%) rename {.partials => partials}/schema.md (100%) rename {.partials => partials}/tags.md (100%) rename asyncapi.md => template/asyncapi.md (92%) diff --git a/.partials/content.md b/.partials/content.md deleted file mode 100644 index b8034fa6b..000000000 --- a/.partials/content.md +++ /dev/null @@ -1,5 +0,0 @@ -{% include ".partials/info.md" %} - -{% if asyncapi.hasChannels() %} -{% include ".partials/channels.md" %} -{% endif %} diff --git a/README.md b/README.md new file mode 100644 index 000000000..ffe18c9ae --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# Markdown template for the AsyncAPI Generator + +## Usage + +``` +ag asyncapi.yaml @asyncapi/markdown-template -o output +``` + +If you don't have the AsyncAPI Generator installed, you can install it like this: + +``` +npm install -g @asyncapi/generator +``` + diff --git a/.filters/all.js b/filters/all.js similarity index 100% rename from .filters/all.js rename to filters/all.js diff --git a/.partials/channel.md b/partials/channel.md similarity index 100% rename from .partials/channel.md rename to partials/channel.md diff --git a/.partials/channels.md b/partials/channels.md similarity index 100% rename from .partials/channels.md rename to partials/channels.md diff --git a/partials/content.md b/partials/content.md new file mode 100644 index 000000000..7ff269026 --- /dev/null +++ b/partials/content.md @@ -0,0 +1,5 @@ +{% include "partials/info.md" %} + +{% if asyncapi.hasChannels() %} +{% include "partials/channels.md" %} +{% endif %} diff --git a/.partials/info.md b/partials/info.md similarity index 100% rename from .partials/info.md rename to partials/info.md diff --git a/.partials/message.md b/partials/message.md similarity index 100% rename from .partials/message.md rename to partials/message.md diff --git a/.partials/operation.md b/partials/operation.md similarity index 100% rename from .partials/operation.md rename to partials/operation.md diff --git a/.partials/parameters.md b/partials/parameters.md similarity index 100% rename from .partials/parameters.md rename to partials/parameters.md diff --git a/.partials/schema-prop.md b/partials/schema-prop.md similarity index 100% rename from .partials/schema-prop.md rename to partials/schema-prop.md diff --git a/.partials/schema.md b/partials/schema.md similarity index 100% rename from .partials/schema.md rename to partials/schema.md diff --git a/.partials/tags.md b/partials/tags.md similarity index 100% rename from .partials/tags.md rename to partials/tags.md diff --git a/asyncapi.md b/template/asyncapi.md similarity index 92% rename from asyncapi.md rename to template/asyncapi.md index c4a1ad8f4..18d5c046b 100644 --- a/asyncapi.md +++ b/template/asyncapi.md @@ -18,4 +18,4 @@ * [Channels](#channels) {% endif %} -{% include ".partials/content.md" %} +{% include "partials/content.md" %}