@do11y/docs 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/files.js CHANGED
@@ -4,5 +4,6 @@ import { searchForWorkspaceRoot } from 'vite';
4
4
  const require = createRequire(import.meta.url);
5
5
  export const ui = join(dirname(require.resolve('@do11y/ui/package.json')));
6
6
  export const root = searchForWorkspaceRoot(process.cwd());
7
+ // export const root = join(searchForWorkspaceRoot(process.cwd()), 'example');
7
8
  export const docs = join(root, 'docs');
8
9
  export const plugins = join(docs, 'site', 'plugins.ts');
package/dist/html/html.js CHANGED
@@ -14,9 +14,11 @@ export const html = (folder, key) => {
14
14
  await writeFile(join(docs, 'dist', `${key}.html`), html);
15
15
  },
16
16
  configureServer(server) {
17
+ /* eslint-disable-next-line @typescript-eslint/no-misused-promises */
17
18
  server.middlewares.use(async (req, res, next) => {
18
19
  if (req.url !== '/' && !req.url?.startsWith('/sandbox')) {
19
- return next();
20
+ next();
21
+ return;
20
22
  }
21
23
  const currentBundle = req.url === '/' ? bundle : sandboxBundle;
22
24
  const html = template
@@ -26,7 +26,7 @@ export default (options) => {
26
26
  if (options?.metaRenderer) {
27
27
  const tsconfig = join(root, 'tsconfig.json');
28
28
  md.use(metaPlugin, {
29
- renderer: options?.metaRenderer,
29
+ renderer: options.metaRenderer,
30
30
  tsconfig,
31
31
  });
32
32
  }
@@ -23,7 +23,7 @@ export default () => {
23
23
  return resolvedModuleId;
24
24
  }
25
25
  },
26
- async load(id) {
26
+ load(id) {
27
27
  if (id === resolvedModuleId) {
28
28
  const stringifiedStories = sandboxFiles.map((path) => {
29
29
  return `{
@@ -1,7 +1,7 @@
1
1
  import type { Plugin } from 'vite';
2
2
  import type { App, Component } from 'vue';
3
3
  import type { Router } from 'vue-router';
4
- export type Site = {
4
+ export interface Site {
5
5
  /**
6
6
  * The main component for the site.
7
7
  */
@@ -10,7 +10,7 @@ export type Site = {
10
10
  * Additional setup for the app.
11
11
  */
12
12
  setup?(app: App, router: Router): void | Promise<void>;
13
- };
13
+ }
14
14
  /**
15
15
  * Add ability to access the site options (`docs/site/index.ts`)
16
16
  * through `do11y:site`.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@do11y/docs",
3
3
  "description": "A very bare-bones tool to help document Vue components.",
4
- "version": "0.0.4",
4
+ "version": "0.0.6",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",
@@ -24,7 +24,8 @@
24
24
  },
25
25
  "peerDependencies": {
26
26
  "@vitejs/plugin-vue": "^6.0.2",
27
- "vue": "3.5.25"
27
+ "vue": "3.5.25",
28
+ "vue-router": "^4.6.3"
28
29
  },
29
30
  "dependencies": {
30
31
  "@mdit-vue/plugin-component": "^3.0.2",
@@ -39,16 +40,15 @@
39
40
  "markdown-it-mark": "^4.0.0",
40
41
  "markdown-it-vue-meta": "^0.0.2",
41
42
  "v-custom-block": "^1.0.67",
42
- "@do11y/ui": "0.0.2"
43
+ "@do11y/ui": "0.0.4"
43
44
  },
44
45
  "devDependencies": {
45
46
  "@tsconfig/node24": "^24.0.3",
47
+ "@types/node": "24.10.3",
46
48
  "@types/markdown-it": "^14.1.2",
47
49
  "@types/markdown-it-attrs": "^4.1.3",
48
- "@types/node": "^24.10.1",
49
50
  "typescript": "5.9.3",
50
- "vite": "^7.2.6",
51
- "vue-router": "^4.6.3"
51
+ "vite": "^7.2.7"
52
52
  },
53
53
  "scripts": {
54
54
  "build": "tsc && copyfiles -f src/html/template.html dist/html"