From 23579f018481f32bb9aae8523442c5af1ade60c1 Mon Sep 17 00:00:00 2001 From: Andrew Lisowski Date: Fri, 19 Mar 2021 15:03:22 -0700 Subject: [PATCH] move to shiki --- docs/components/defaultLabelsRenderer.js | 31 ------------------------ docs/generate-command-docs.js | 20 +++++++++++++++ docs/pages/_document.js | 9 ------- docs/pages/docs/configuration/autorc.mdx | 2 +- package.json | 3 +-- yarn.lock | 26 +++++++++++++------- 6 files changed, 39 insertions(+), 52 deletions(-) delete mode 100644 docs/components/defaultLabelsRenderer.js diff --git a/docs/components/defaultLabelsRenderer.js b/docs/components/defaultLabelsRenderer.js deleted file mode 100644 index d4f23b288..000000000 --- a/docs/components/defaultLabelsRenderer.js +++ /dev/null @@ -1,31 +0,0 @@ -import { igniteComponents } from "next-ignite"; -// eslint-disable-next-line import/no-extraneous-dependencies -import { defaultLabels } from "@auto-it/core/dist/semver"; -import Highlight, { defaultProps } from "prism-react-renderer"; - -/** Render the current default labels in a details element */ -export const DefaultLabelRenderer = () => ( -
- Click here to see the default label configuration - - - {({ className, style, tokens, getLineProps, getTokenProps }) => ( - - - {tokens.map((line, i) => ( -
- {line.map((token, key) => ( - - ))} -
- ))} -
-
- )} -
-
-); diff --git a/docs/generate-command-docs.js b/docs/generate-command-docs.js index 03c02c236..a925d5366 100755 --- a/docs/generate-command-docs.js +++ b/docs/generate-command-docs.js @@ -6,6 +6,7 @@ const { camelCase } = require("change-case"); const endent = require("endent").default; const glob = require("fast-glob"); const docs = require("command-line-docs").default; +const { defaultLabels } = require("../packages/core/dist/semver"); const { commands } = require("../packages/cli/dist/parse-args"); try { @@ -100,3 +101,22 @@ glob lines.join("\n") ); }); + +fs.writeFileSync( + path.join(__dirname, "./pages/docs/generated/defaultLabelsRenderer.mdx"), + `--- +title: "Default Labels" +layout: 'none' +--- + +
+ +Click here to see the default label configuration + +\`\`\`json +${JSON.stringify(defaultLabels, null, 2)} +\`\`\` + +
+` +); diff --git a/docs/pages/_document.js b/docs/pages/_document.js index 5c63ae8c6..73233540f 100644 --- a/docs/pages/_document.js +++ b/docs/pages/_document.js @@ -30,15 +30,6 @@ class MyDocument extends Document { --color-gray-1000: #181517; } `} - -