boltdocs 1.0.0 → 1.0.1

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/package.json CHANGED
@@ -1,13 +1,10 @@
1
1
  {
2
2
  "name": "boltdocs",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A lightweight documentation generator for React projects.",
5
5
  "main": "dist/node/index.js",
6
6
  "module": "dist/node/index.mjs",
7
7
  "types": "dist/node/index.d.ts",
8
- "bin": {
9
- "boltdocs": "./dist/node/cli/index.js"
10
- },
11
8
  "publishConfig": {
12
9
  "access": "public"
13
10
  },
@@ -45,7 +42,6 @@
45
42
  "dependencies": {
46
43
  "@mdx-js/react": "^3.1.1",
47
44
  "@mdx-js/rollup": "^3.1.1",
48
- "cac": "^7.0.0",
49
45
  "fast-glob": "^3.3.3",
50
46
  "github-slugger": "^2.0.0",
51
47
  "gray-matter": "^4.0.3",
package/tsconfig.json CHANGED
@@ -16,5 +16,6 @@
16
16
  "exclude": [
17
17
  "node_modules",
18
18
  "dist",
19
+ "src/node/cli"
19
20
  ]
20
21
  }
@@ -1,15 +0,0 @@
1
- import path from "path";
2
- import { resolveConfig } from "../../config";
3
-
4
- export async function configAction(root?: string) {
5
- const rootDir = root ? path.resolve(root) : process.cwd();
6
- const docsDir = path.resolve(rootDir, "docs");
7
-
8
- try {
9
- const config = await resolveConfig(docsDir);
10
- process.stdout.write(JSON.stringify(config, null, 2) + "\n");
11
- } catch (e) {
12
- process.stderr.write("Failed to resolve configuration: " + e + "\n");
13
- process.exit(1);
14
- }
15
- }
@@ -1,24 +0,0 @@
1
- import path from "path";
2
- import fs from "node:fs";
3
- import { DEFAULT_CSS_VARIABLES } from "../constants";
4
-
5
- export function generateCssAction(outputPath?: string) {
6
- try {
7
- const target = process.cwd();
8
- const filename = outputPath || "custom.css";
9
- const filepath = path.resolve(target, filename);
10
-
11
- if (fs.existsSync(filepath)) {
12
- process.stderr.write(
13
- "Error: File " + filename + " already exists in " + target + ".\n",
14
- );
15
- process.exit(1);
16
- }
17
-
18
- fs.writeFileSync(filepath, DEFAULT_CSS_VARIABLES);
19
- process.stdout.write("Success! Generated " + filename + "\n");
20
- } catch (e) {
21
- process.stderr.write("Failed to generate CSS: " + e + "\n");
22
- process.exit(1);
23
- }
24
- }
@@ -1,70 +0,0 @@
1
- export const DEFAULT_CSS_VARIABLES = `:root {
2
- /* ─ Base palette ─ */
3
- --ld-bg-main: #0a0a0f;
4
- --ld-bg-soft: #0f0f18;
5
- --ld-bg-mute: #141420;
6
- --ld-surface: #1a1a2e;
7
- --ld-border-subtle: rgba(255, 255, 255, 0.06);
8
- --ld-border-strong: rgba(255, 255, 255, 0.12);
9
-
10
- /* ─ Text ─ */
11
- --ld-text-main: #e4e4ed;
12
- --ld-text-muted: #9d9db5;
13
- --ld-text-dim: #6b6b85;
14
-
15
- /* ─ Accent ─ */
16
- --ld-color-primary: #ffff;
17
- --ld-color-primary-hover: #f8f8f8;
18
- --ld-color-primary-muted: rgba(255, 255, 255, 0.05);
19
- --ld-color-primary-glow: rgba(255, 255, 255, 0.15);
20
- --ld-color-primary-text: #010101;
21
- --ld-color-accent: #ffff; /* Yellow accent for TOC */
22
-
23
- /* ─ Code ─ */
24
- --ld-code-bg: #0d0d14;
25
- --ld-code-header: #111119;
26
- --ld-code-text: #d4d4d4;
27
-
28
- /* ─ Typography ─ */
29
- --ld-font-sans: "Inter", system-ui, -apple-system, sans-serif;
30
- --ld-font-mono:
31
- "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
32
- monospace;
33
-
34
- /* ─ Dimensions ─ */
35
- --ld-navbar-height: 3.5rem;
36
- --ld-sidebar-width: 14.5rem;
37
- --ld-toc-width: 13rem;
38
- --ld-content-max-width: 820px;
39
- --ld-radius-sm: 4px;
40
- --ld-radius-md: 8px;
41
- --ld-radius-lg: 12px;
42
- --ld-radius-full: 9999px;
43
- }
44
-
45
- [data-theme="light"],
46
- .theme-light {
47
- --ld-bg-main: #ffffff;
48
- --ld-bg-soft: #f9fafb;
49
- --ld-bg-mute: #f3f4f6;
50
-
51
- --ld-surface: #ffffff;
52
-
53
- --ld-border-subtle: #e5e7eb;
54
- --ld-border-strong: #d1d5db;
55
-
56
- --ld-text-main: #111827;
57
- --ld-text-muted: #4b5563;
58
- --ld-text-dim: #6b7280;
59
-
60
- --ld-color-primary: #010101;
61
- --ld-color-primary-hover: #010101;
62
- --ld-color-primary-muted: rgba(127, 19, 236, 0.1);
63
- --ld-color-primary-glow: rgba(127, 19, 236, 0.25);
64
- --ld-color-primary-text: #010101;
65
-
66
- --ld-code-bg: #f3f4f6;
67
- --ld-code-header: #e5e7eb;
68
- --ld-code-text: #1f2937;
69
- }
70
- `;
@@ -1,22 +0,0 @@
1
- #!/usr/bin/env node
2
- import cac from "cac";
3
- import { configAction } from "./commands/config";
4
- import { generateCssAction } from "./commands/generate-css";
5
-
6
- const cli = cac("boltdocs");
7
-
8
- cli
9
- .command("config [root]", "Output the resolved boltdocs configuration")
10
- .action(configAction);
11
-
12
- cli
13
- .command(
14
- "generate:css [path]",
15
- "Generate a custom.css file with default Boltdocs CSS variables",
16
- )
17
- .action(generateCssAction);
18
-
19
- cli.help();
20
- cli.version("1.0.0");
21
-
22
- cli.parse();