Skip to content

Commit

Permalink
Revert "Feat: Improve Documentation Engine Further (CEbbinghaus#17)"
Browse files Browse the repository at this point in the history
This reverts commit 5ba3afe.
  • Loading branch information
jfreuden authored Feb 23, 2024
1 parent 5ba3afe commit 51cedc9
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 91 deletions.
2 changes: 1 addition & 1 deletion backend/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.1
0.10.0
31 changes: 0 additions & 31 deletions docs/README.md

This file was deleted.

42 changes: 0 additions & 42 deletions docs/components/CurrentCard.tsx

This file was deleted.

6 changes: 0 additions & 6 deletions docs/index.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import { CurrentCard } from "./components/CurrentCard";

# Hello, World!

This is the beginning of the docs, Unfortunately they are still under construction ⚠️🚧👷

Here is a little demo of why my 20 hour investment into this doc engine was totally worth it:

> <CurrentCard/>
6 changes: 3 additions & 3 deletions plugin.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "MicroSDeck",
"author": "CEbbinghaus",
"flags": ["debug"],
"flags": ["debug", "_root"],
"publish": {
"tags": ["microsd", "sdcard", "manager"],
"tags": ["microsd", "root"],
"description": "A plugin to manage MicroSD cards.",
"image": "https://raw.githubusercontent.com/CEbbinghaus/MicroSDeck/master/assets/Logo.png"
"image": "https://raw.githubusercontent.com/CEbbinghaus/MicroSDeck/master/Logo.png"
}
}
9 changes: 3 additions & 6 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,10 @@ export default definePlugin((serverApi: ServerAPI) => {
DeckyAPI.SetApi(serverApi);

Logger.Log("Started MicroSDeck");

const patch = PatchAppScreen(serverApi);

serverApi.routerHook.addRoute(DOCUMENTATION_PATH, () => (
<MicroSDeckContextProvider microSDeck={window.MicroSDeck || (() => {throw "MicroSDeck not initialized";})()}>
<Docs />
</MicroSDeckContextProvider>));
serverApi.routerHook.addRoute(DOCUMENTATION_PATH, Docs);

return {
title: <div className={staticClasses.Title}>MicroSDeck</div>,
Expand All @@ -168,7 +165,7 @@ export default definePlugin((serverApi: ServerAPI) => {
onDismount() {
window.MicroSDeck?.destruct();
window.MicroSDeck = undefined;

serverApi.routerHook.removeRoute(DOCUMENTATION_PATH);
patch && serverApi.routerHook.removePatch('/library/app/:appid', patch);
},
Expand Down
2 changes: 1 addition & 1 deletion src/pages/docs.codegen
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { parse, join } = require('path');

const docsDir = join(__dirname, '../../docs');

const docs = readdirSync(docsDir).filter(file => file.endsWith(".mdx"));
const docs = readdirSync(docsDir);

const keyedDocs = docs.map(() => `_${Math.random().toString(36).slice(2) }`);

Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"outDir": "build/dist",
"module": "ESNext",
"target": "ES2020",
"jsx": "react",
Expand All @@ -19,6 +20,6 @@
"allowSyntheticDefaultImports": true,
"skipLibCheck": true
},
"include": ["src", "lib", "docs"],
"include": ["src", "lib"],
"exclude": ["node_modules"]
}

0 comments on commit 51cedc9

Please sign in to comment.