From 2ee3d718e069abbfad14621fda2db30fd4081438 Mon Sep 17 00:00:00 2001 From: Taron Chatoyan <47221390+t-chatoyan@users.noreply.github.com> Date: Fri, 7 Jun 2024 03:31:59 +0400 Subject: [PATCH] feat(plugins): doc is now generated based on JSON-SCHEMA (#36) Co-authored-by: brian.mulier --- package-lock.json | 16 ++ package.json | 1 + src/components/index.js | 6 +- src/components/plugins/SchemaToCode.vue | 166 +++++++++++++ src/components/plugins/SchemaToHtml.vue | 304 ++++++++++++++++++++++++ 5 files changed, 492 insertions(+), 1 deletion(-) create mode 100644 src/components/plugins/SchemaToCode.vue create mode 100644 src/components/plugins/SchemaToHtml.vue diff --git a/package-lock.json b/package-lock.json index d7ead42..d038e84 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "eslint": "^8.57.0", "eslint-plugin-vue": "^9.23.0", "sass": "^1.71.1", + "shiki": "^1.1.7", "vite": "^5.1.6", "vite-plugin-static-copy": "^1.0.1" }, @@ -775,6 +776,12 @@ "win32" ] }, + "node_modules/@shikijs/core": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.5.2.tgz", + "integrity": "sha512-wSAOgaz48GmhILFElMCeQypSZmj6Ru6DttOOtl3KNkdJ17ApQuGNCfzpk4cClasVrnIu45++2DBwG4LNMQAfaA==", + "dev": true + }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", @@ -2773,6 +2780,15 @@ "node": ">=8" } }, + "node_modules/shiki": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.5.2.tgz", + "integrity": "sha512-fpPbuSaatinmdGijE7VYUD3hxLozR3ZZ+iAx8Iy2X6REmJGyF5hQl94SgmiUNTospq346nXUVZx0035dyGvIVw==", + "dev": true, + "dependencies": { + "@shikijs/core": "1.5.2" + } + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", diff --git a/package.json b/package.json index 1fca7f4..162a763 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "eslint": "^8.57.0", "eslint-plugin-vue": "^9.23.0", "sass": "^1.71.1", + "shiki": "^1.1.7", "vite": "^5.1.6", "vite-plugin-static-copy": "^1.0.1" } diff --git a/src/components/index.js b/src/components/index.js index aaf201c..684d730 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -19,7 +19,11 @@ import TaskIcon from "./misc/TaskIcon.vue"; // buttons import AddTaskButton from "./buttons/AddTaskButton.vue"; +// plugins +import SchemaToHtml from "./plugins/SchemaToHtml.vue"; + export {ClusterNode, DotNode, EdgeNode, TaskNode, TriggerNode, BasicNode, CollapsedClusterNode, DependenciesNode}; export {Topology} export {ExecutionInformations, State, TaskIcon}; -export {AddTaskButton}; \ No newline at end of file +export {AddTaskButton}; +export {SchemaToHtml}; \ No newline at end of file diff --git a/src/components/plugins/SchemaToCode.vue b/src/components/plugins/SchemaToCode.vue new file mode 100644 index 0000000..8fdd4bb --- /dev/null +++ b/src/components/plugins/SchemaToCode.vue @@ -0,0 +1,166 @@ + + + + + diff --git a/src/components/plugins/SchemaToHtml.vue b/src/components/plugins/SchemaToHtml.vue new file mode 100644 index 0000000..39ccc0d --- /dev/null +++ b/src/components/plugins/SchemaToHtml.vue @@ -0,0 +1,304 @@ + + + + + \ No newline at end of file