@tenphi/cookbook 0.12.0 → 0.15.0
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/README.md +32 -1
- package/dist/cli.js +103 -61
- package/dist/cli.js.map +1 -1
- package/dist/components.d.ts +3 -2
- package/dist/components.js +2 -2
- package/dist/config.d.ts +3 -0
- package/dist/config.js +3 -0
- package/dist/eslint-plugin.d.ts +3 -0
- package/dist/eslint-plugin.js +3 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/package.json +14 -6
- package/tasty.config.mjs +1 -0
package/README.md
CHANGED
|
@@ -9,6 +9,19 @@ import cookbook from "@tenphi/cookbook";
|
|
|
9
9
|
export default defineConfig({ integrations: [cookbook()] });
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
+
Optional `docs.config.ts` is discovered by both Astro and the CLI:
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { defineDocsConfig } from "@tenphi/cookbook/config";
|
|
16
|
+
|
|
17
|
+
export default defineDocsConfig({ site: { title: "My project" } });
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Without configuration, a root `README.md` becomes `/` and
|
|
21
|
+
`docs/**/*.{md,mdx}` supplies the remaining pages. Cookbook includes Starlight,
|
|
22
|
+
generates only static output, and derives its URL base from Astro. Adding other
|
|
23
|
+
Astro content collections does not require a Cookbook collection adapter.
|
|
24
|
+
|
|
12
25
|
Build custom Astro or MDX components with Cookbook's configured styling runtime:
|
|
13
26
|
|
|
14
27
|
```ts
|
|
@@ -20,8 +33,26 @@ export const ProjectBadge = defineComponent("ProjectBadge", {
|
|
|
20
33
|
});
|
|
21
34
|
```
|
|
22
35
|
|
|
23
|
-
Customize this component's root through `theme.
|
|
36
|
+
Customize this component's root through `theme.customStyles.ProjectBadge`; it has no
|
|
24
37
|
named sub-elements. The `/styling` entry point also exports `tasty`, `useGlobalStyles`,
|
|
25
38
|
`resolveComponentStyles`, `mergeStyles`, and the `Styles` type. Cookbook extracts
|
|
26
39
|
the CSS automatically. See [Theme and components](https://cookbook.tenphi.me/theme-and-components/)
|
|
27
40
|
for a complete custom logo and site title example.
|
|
41
|
+
|
|
42
|
+
Lint these styles with the plugin and Cookbook validation preset from
|
|
43
|
+
`@tenphi/cookbook/eslint-plugin`:
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
// tasty.config.ts
|
|
47
|
+
export default {
|
|
48
|
+
extends: "@tenphi/cookbook",
|
|
49
|
+
tokens: ["$project-gap"], // Optional additions to the built-in theme names.
|
|
50
|
+
};
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The entry point exports the default Tasty ESLint plugin, `recommended` and `strict`
|
|
54
|
+
rule maps, and the upstream configuration types. The preset recognizes Cookbook's
|
|
55
|
+
theme names and custom styling helpers, including `defineComponent`. `extends`
|
|
56
|
+
merges your additional tokens, states, and presets with these built-ins.
|
|
57
|
+
See [Linting custom styles](https://cookbook.tenphi.me/theme-and-components/#linting-custom-styles)
|
|
58
|
+
for ESLint and oxlint configuration examples.
|
package/dist/cli.js
CHANGED
|
@@ -1,76 +1,118 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { resolveDocsTheme } from "@tenphi/starlight";
|
|
3
|
+
import { createDocsGraph, formatDiagnostics, materializePackage, normalizeDocsConfig, readDocsLock, reconcileDocsLock, resolveDocsProject, writeDocsLock } from "@tenphi/docs";
|
|
4
|
+
import { cp, mkdir } from "node:fs/promises";
|
|
5
|
+
import { dirname, resolve } from "node:path";
|
|
5
6
|
import { parseArgs } from "node:util";
|
|
6
|
-
import { createJiti } from "jiti";
|
|
7
7
|
//#region src/cli.ts
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
type: "
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
let jsonOutput = process.argv.slice(2).includes("--json");
|
|
9
|
+
try {
|
|
10
|
+
const { positionals, values } = parseArgs({
|
|
11
|
+
allowPositionals: true,
|
|
12
|
+
options: {
|
|
13
|
+
json: {
|
|
14
|
+
type: "boolean",
|
|
15
|
+
default: false
|
|
16
|
+
},
|
|
17
|
+
root: { type: "string" },
|
|
18
|
+
config: { type: "string" },
|
|
19
|
+
"dry-run": {
|
|
20
|
+
type: "boolean",
|
|
21
|
+
default: false
|
|
22
|
+
},
|
|
23
|
+
help: {
|
|
24
|
+
type: "boolean",
|
|
25
|
+
short: "h",
|
|
26
|
+
default: false
|
|
27
|
+
}
|
|
20
28
|
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if (values.help || positionals.length === 0) printHelp();
|
|
24
|
-
else {
|
|
25
|
-
const command = positionals[0];
|
|
26
|
-
const root = resolve(values.root ?? process.cwd());
|
|
27
|
-
if (command === "doctor") await doctor(root, values.json);
|
|
28
|
-
else if (command === "update") await update(root, values.json);
|
|
29
|
+
});
|
|
30
|
+
jsonOutput = values.json;
|
|
31
|
+
if (values.help || positionals.length === 0) printHelp();
|
|
29
32
|
else {
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
const command = positionals[0];
|
|
34
|
+
if (command !== "doctor" && command !== "update") throw new Error(`Unknown command: ${command ?? ""}.`);
|
|
35
|
+
if (command === "doctor" && (positionals.length > 1 || values["dry-run"])) throw new Error("doctor does not accept package selectors or --dry-run.");
|
|
36
|
+
const project = await resolveDocsProject({
|
|
37
|
+
root: resolve(values.root ?? process.cwd()),
|
|
38
|
+
...values.config ? { configFile: values.config } : {}
|
|
39
|
+
});
|
|
40
|
+
if (command === "doctor") await doctor(project, values.json);
|
|
41
|
+
else await update(project, positionals.slice(1), values.json, values["dry-run"]);
|
|
32
42
|
}
|
|
43
|
+
} catch (error) {
|
|
44
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
45
|
+
const diagnostics = error && typeof error === "object" && "diagnostics" in error ? error.diagnostics : [{
|
|
46
|
+
code: "COOKBOOK_CLI_ERROR",
|
|
47
|
+
severity: "error",
|
|
48
|
+
message
|
|
49
|
+
}];
|
|
50
|
+
if (jsonOutput) console.log(JSON.stringify({
|
|
51
|
+
ok: false,
|
|
52
|
+
pages: 0,
|
|
53
|
+
assets: 0,
|
|
54
|
+
diagnostics
|
|
55
|
+
}, null, 2));
|
|
56
|
+
else console.error(formatDiagnostics(diagnostics));
|
|
57
|
+
process.exitCode = 1;
|
|
33
58
|
}
|
|
34
|
-
async function doctor(
|
|
35
|
-
const
|
|
36
|
-
const graph = await createDocsGraph(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}));
|
|
59
|
+
async function doctor(project, json) {
|
|
60
|
+
const theme = resolveDocsTheme(project.config.theme);
|
|
61
|
+
const graph = await createDocsGraph(project);
|
|
62
|
+
const diagnostics = [...graph.diagnostics, ...theme.diagnostics];
|
|
63
|
+
const hasErrors = diagnostics.some((diagnostic) => diagnostic.severity === "error");
|
|
64
|
+
if (json) console.log(JSON.stringify({
|
|
65
|
+
ok: !hasErrors,
|
|
66
|
+
pages: graph.entries.length,
|
|
67
|
+
assets: graph.assets.length,
|
|
68
|
+
diagnostics
|
|
69
|
+
}, null, 2));
|
|
70
|
+
else if (diagnostics.length > 0) console.log(formatDiagnostics(diagnostics));
|
|
45
71
|
else console.log(`Cookbook is healthy: ${graph.entries.length} pages, ${graph.assets.length} assets.`);
|
|
46
|
-
if (
|
|
72
|
+
if (hasErrors) process.exitCode = 1;
|
|
47
73
|
}
|
|
48
|
-
async function update(
|
|
49
|
-
const existing = await readDocsLock(root);
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
74
|
+
async function update(project, packages, json, dryRun) {
|
|
75
|
+
const existing = await readDocsLock(project.root);
|
|
76
|
+
const next = await reconcileDocsLock(project.config, existing, { packages });
|
|
77
|
+
const changes = next.sources.map((source) => ({
|
|
78
|
+
requested: source.requested,
|
|
79
|
+
from: existing?.sources.find((current) => current.requested === source.requested)?.resolved ?? null,
|
|
80
|
+
to: source.resolved
|
|
81
|
+
}));
|
|
82
|
+
const removed = existing?.sources.filter((source) => !next.sources.some((current) => current.requested === source.requested)).map((source) => source.requested) ?? [];
|
|
83
|
+
if (!dryRun) {
|
|
84
|
+
const build = normalizeDocsConfig(project.config).build;
|
|
85
|
+
for (const source of next.sources) {
|
|
86
|
+
if (!source.vendored) continue;
|
|
87
|
+
const current = existing?.sources.find((entry) => entry.requested === source.requested);
|
|
88
|
+
if (current?.vendored === source.vendored && current.integrity === source.integrity) continue;
|
|
89
|
+
const { vendored, ...remote } = source;
|
|
90
|
+
const artifact = await materializePackage(remote, build, project.root);
|
|
91
|
+
const destination = resolve(project.root, vendored);
|
|
92
|
+
await mkdir(dirname(destination), { recursive: true });
|
|
93
|
+
await cp(artifact, destination, { recursive: true });
|
|
94
|
+
}
|
|
95
|
+
await writeDocsLock(project.root, next);
|
|
96
|
+
}
|
|
97
|
+
if (json) console.log(JSON.stringify({
|
|
98
|
+
ok: true,
|
|
99
|
+
pages: 0,
|
|
100
|
+
assets: 0,
|
|
101
|
+
diagnostics: [],
|
|
102
|
+
dryRun,
|
|
103
|
+
changes,
|
|
104
|
+
removed,
|
|
105
|
+
lock: next
|
|
106
|
+
}, null, 2));
|
|
56
107
|
else {
|
|
57
|
-
for (const
|
|
58
|
-
console.log(
|
|
108
|
+
for (const change of changes) console.log(`${change.requested}: ${change.from ?? "(new)"} -> ${change.to}`);
|
|
109
|
+
for (const source of removed) console.log(`Removed ${source}`);
|
|
110
|
+
console.log(dryRun ? "Dry run: cookbook.lock.json is unchanged." : "Updated cookbook.lock.json.");
|
|
59
111
|
}
|
|
60
112
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"docs.config.mts",
|
|
65
|
-
"docs.config.js",
|
|
66
|
-
"docs.config.mjs"
|
|
67
|
-
].map((name) => resolve(root, name)).find(existsSync);
|
|
68
|
-
if (!path) return void 0;
|
|
69
|
-
return await createJiti(import.meta.url, { interopDefault: true }).import(path, { default: true });
|
|
70
|
-
}
|
|
71
|
-
function printHelp(code = 0) {
|
|
72
|
-
console.log(`Usage: cookbook <command> [options]\n\nCommands:\n doctor Validate sources, routes, links, assets, and theme\n update Resolve package sources and refresh the integrity lock\n\nOptions:\n --root <directory>\n --json\n -h, --help`);
|
|
73
|
-
process.exit(code);
|
|
113
|
+
function printHelp() {
|
|
114
|
+
console.log(`Usage: cookbook <command> [options]\n\nCommands:\n doctor Validate content, configuration, and theme\n update [packages] Reconcile configured package sources and their lock\n\nOptions:\n --root <directory>\n --config <path>\n --dry-run Preview an update without writing files\n --json\n -h, --help`);
|
|
115
|
+
process.exit(0);
|
|
74
116
|
}
|
|
75
117
|
//#endregion
|
|
76
118
|
export {};
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","names":[],"sources":["../src/cli.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"cli.js","names":[],"sources":["../src/cli.ts"],"sourcesContent":["import { cp, mkdir } from \"node:fs/promises\";\nimport { dirname, resolve } from \"node:path\";\nimport { parseArgs } from \"node:util\";\nimport {\n createDocsGraph,\n formatDiagnostics,\n materializePackage,\n normalizeDocsConfig,\n readDocsLock,\n reconcileDocsLock,\n resolveDocsProject,\n writeDocsLock,\n type DocsDiagnostic,\n type DocsProject,\n} from \"@tenphi/docs\";\nimport { resolveDocsTheme } from \"@tenphi/starlight\";\n\nlet jsonOutput = process.argv.slice(2).includes(\"--json\");\n\ntry {\n const { positionals, values } = parseArgs({\n allowPositionals: true,\n options: {\n json: { type: \"boolean\", default: false },\n root: { type: \"string\" },\n config: { type: \"string\" },\n \"dry-run\": { type: \"boolean\", default: false },\n help: { type: \"boolean\", short: \"h\", default: false },\n },\n });\n jsonOutput = values.json;\n if (values.help || positionals.length === 0) {\n printHelp();\n } else {\n const command = positionals[0];\n if (command !== \"doctor\" && command !== \"update\") {\n throw new Error(`Unknown command: ${command ?? \"\"}.`);\n }\n if (command === \"doctor\" && (positionals.length > 1 || values[\"dry-run\"])) {\n throw new Error(\"doctor does not accept package selectors or --dry-run.\");\n }\n const project = await resolveDocsProject({\n root: resolve(values.root ?? process.cwd()),\n ...(values.config ? { configFile: values.config } : {}),\n });\n if (command === \"doctor\") await doctor(project, values.json);\n else\n await update(\n project,\n positionals.slice(1),\n values.json,\n values[\"dry-run\"],\n );\n }\n} catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n const diagnostics: DocsDiagnostic[] =\n error && typeof error === \"object\" && \"diagnostics\" in error\n ? (error.diagnostics as DocsDiagnostic[])\n : [{ code: \"COOKBOOK_CLI_ERROR\", severity: \"error\", message }];\n if (jsonOutput) {\n console.log(\n JSON.stringify({ ok: false, pages: 0, assets: 0, diagnostics }, null, 2),\n );\n } else {\n console.error(formatDiagnostics(diagnostics));\n }\n process.exitCode = 1;\n}\n\nasync function doctor(project: DocsProject, json: boolean): Promise<void> {\n const theme = resolveDocsTheme(project.config.theme);\n const graph = await createDocsGraph(project);\n const diagnostics = [...graph.diagnostics, ...theme.diagnostics];\n const hasErrors = diagnostics.some(\n (diagnostic) => diagnostic.severity === \"error\",\n );\n if (json) {\n console.log(\n JSON.stringify(\n {\n ok: !hasErrors,\n pages: graph.entries.length,\n assets: graph.assets.length,\n diagnostics,\n },\n null,\n 2,\n ),\n );\n } else if (diagnostics.length > 0) {\n console.log(formatDiagnostics(diagnostics));\n } else {\n console.log(\n `Cookbook is healthy: ${graph.entries.length} pages, ${graph.assets.length} assets.`,\n );\n }\n if (hasErrors) process.exitCode = 1;\n}\n\nasync function update(\n project: DocsProject,\n packages: string[],\n json: boolean,\n dryRun: boolean,\n): Promise<void> {\n const existing = await readDocsLock(project.root);\n const next = await reconcileDocsLock(project.config, existing, { packages });\n const changes = next.sources.map((source) => ({\n requested: source.requested,\n from:\n existing?.sources.find(\n (current) => current.requested === source.requested,\n )?.resolved ?? null,\n to: source.resolved,\n }));\n const removed =\n existing?.sources\n .filter(\n (source) =>\n !next.sources.some(\n (current) => current.requested === source.requested,\n ),\n )\n .map((source) => source.requested) ?? [];\n if (!dryRun) {\n const build = normalizeDocsConfig(project.config).build;\n for (const source of next.sources) {\n if (!source.vendored) continue;\n const current = existing?.sources.find(\n (entry) => entry.requested === source.requested,\n );\n if (\n current?.vendored === source.vendored &&\n current.integrity === source.integrity\n )\n continue;\n const { vendored, ...remote } = source;\n const artifact = await materializePackage(remote, build, project.root);\n const destination = resolve(project.root, vendored);\n await mkdir(dirname(destination), { recursive: true });\n await cp(artifact, destination, { recursive: true });\n }\n await writeDocsLock(project.root, next);\n }\n if (json) {\n console.log(\n JSON.stringify(\n {\n ok: true,\n pages: 0,\n assets: 0,\n diagnostics: [],\n dryRun,\n changes,\n removed,\n lock: next,\n },\n null,\n 2,\n ),\n );\n } else {\n for (const change of changes)\n console.log(\n `${change.requested}: ${change.from ?? \"(new)\"} -> ${change.to}`,\n );\n for (const source of removed) console.log(`Removed ${source}`);\n console.log(\n dryRun\n ? \"Dry run: cookbook.lock.json is unchanged.\"\n : \"Updated cookbook.lock.json.\",\n );\n }\n}\n\nfunction printHelp(): never {\n console.log(\n `Usage: cookbook <command> [options]\\n\\nCommands:\\n doctor Validate content, configuration, and theme\\n update [packages] Reconcile configured package sources and their lock\\n\\nOptions:\\n --root <directory>\\n --config <path>\\n --dry-run Preview an update without writing files\\n --json\\n -h, --help`,\n );\n process.exit(0);\n}\n"],"mappings":";;;;;;;AAiBA,IAAI,aAAa,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,QAAQ;AAExD,IAAI;CACF,MAAM,EAAE,aAAa,WAAW,UAAU;EACxC,kBAAkB;EAClB,SAAS;GACP,MAAM;IAAE,MAAM;IAAW,SAAS;GAAM;GACxC,MAAM,EAA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I;GACrE,MAAM,cAAc,QAAQ,QAAQ,MAAM,QAAQ;GAClD,MAAM,MAAM,QAAQ,WAAW,GAAG,EAAE,WAAW,KAAK,CAAC;GACrD,MAAM,GAAG,UAAU,aAAa,EAAE,WAAW,KAAK,CAAC;EACrD;EACA,MAAM,cAAc,QAAQ,MAAM,IAAI;CACxC;CACA,IAAI,MACF,QAAQ,IACN,KAAK,UACH;EACE,IAAI;EACJ,OAAO;EACP,QAAQ;EACR,aAAa,CAAC;EACd;EACA;EACA;EACA,MAAM;CACR,GACA,MACA,CACF,CACF;MACK;EACL,KAAK,MAAM,UAAU,SACnB,QAAQ,IACN,GAAG,OAAO,UAAU,IAAI,OAAO,QAAQ,QAAQ,MAAM,OAAO,IAC9D;EACF,KAAK,MAAM,UAAU,SAAS,QAAQ,IAAI,WAAW,QAAQ;EAC7D,QAAQ,IACN,SACI,8CACA,6BACN;CACF;AACF;AAEA,SAAS,YAAmB;CAC1B,QAAQ,IACN,wUACF;CACA,QAAQ,KAAK,CAAC;AAChB"}
|
package/dist/components.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
import { Card, Logo, Preview, Steps, Tabs } from "@tenphi/starlight/components";
|
|
3
|
-
export
|
|
2
|
+
import { Callout, Card, CodeGroup, Logo, Preview, Steps, Tab, Tabs } from "@tenphi/starlight/components";
|
|
3
|
+
export type * from "@tenphi/starlight/components";
|
|
4
|
+
export { Callout, Card, CodeGroup, Logo, Preview, Steps, Tab, Tabs };
|
package/dist/components.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Card, Logo, Preview, Steps, Tabs } from "@tenphi/starlight/components";
|
|
3
|
-
export { Card, Logo, Preview, Steps, Tabs };
|
|
2
|
+
import { Callout, Card, CodeGroup, Logo, Preview, Steps, Tab, Tabs } from "@tenphi/starlight/components";
|
|
3
|
+
export { Callout, Card, CodeGroup, Logo, Preview, Steps, Tab, Tabs };
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
|
|
2
|
+
import { COOKBOOK_COMPONENT_NAMES, COOKBOOK_COMPONENT_SUB_ELEMENTS, ComponentStylesConfig, DocsConfig, DocsSource, ThemeConfig, defineDocsConfig, mergeDocsConfig } from "@tenphi/docs/config";
|
|
3
|
+
export { COOKBOOK_COMPONENT_NAMES, COOKBOOK_COMPONENT_SUB_ELEMENTS, type ComponentStylesConfig, type DocsConfig, type DocsSource, type ThemeConfig, defineDocsConfig, mergeDocsConfig };
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
|
|
2
|
+
import eslint_plugin_default, { ResolvedConfig, StyleFunctionConfig, TastyValidationConfig, recommended, strict, validationConfig } from "@tenphi/starlight/eslint-plugin";
|
|
3
|
+
export { type ResolvedConfig, type StyleFunctionConfig, type TastyValidationConfig, eslint_plugin_default as default, recommended, strict, validationConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
2
|
import starlight_default, { CookbookOptions, DEFAULT_THEME_TOKENS, DEFAULT_TYPOGRAPHY_PRESETS } from "@tenphi/starlight";
|
|
3
|
-
import { BrandConfig, BuildConfig, COOKBOOK_COMPONENT_NAMES, COOKBOOK_COMPONENT_SUB_ELEMENTS, ComponentStyleConfig, ComponentStyles, ComponentStylesConfig, ComponentsConfig, ContentConfig, CookbookComponentName, CookbookComponentStyles, CookbookComponentSubElementName, DocsAsset, DocsConfig, DocsDiagnostic, DocsEntry, DocsFrontmatter, DocsGraph, DocsRoute, DocsSource, EditLinkConfig, HeadConfig, LocaleConfig, MarkdownConfig, NavigationConfig, NavigationItem, NavigationTab, SearchConfig, SiteConfig, SiteIconConfig, ThemeConfig, ThemePaletteConfig, ThemeTokenValue, ThemeTokens, TypographyPreset, TypographyPresets, defineDocsConfig } from "@tenphi/docs";
|
|
4
|
-
export { type BrandConfig, type BuildConfig, COOKBOOK_COMPONENT_NAMES, COOKBOOK_COMPONENT_SUB_ELEMENTS, type ComponentStyleConfig, type ComponentStyles, type ComponentStylesConfig, type ComponentsConfig, type ContentConfig, type CookbookComponentName, type CookbookComponentStyles, type CookbookComponentSubElementName, type CookbookOptions, DEFAULT_THEME_TOKENS, DEFAULT_TYPOGRAPHY_PRESETS, type DocsAsset, type DocsConfig, type DocsDiagnostic, type DocsEntry, type DocsFrontmatter, type DocsGraph, type DocsRoute, type DocsSource, type EditLinkConfig, type HeadConfig, type LocaleConfig, type MarkdownConfig, type NavigationConfig, type NavigationItem, type NavigationTab, type SearchConfig, type SiteConfig, type SiteIconConfig, type ThemeConfig, type ThemePaletteConfig, type ThemeTokenValue, type ThemeTokens, type TypographyPreset, type TypographyPresets, starlight_default as default, defineDocsConfig };
|
|
3
|
+
import { BrandConfig, BuildConfig, COOKBOOK_COMPONENT_NAMES, COOKBOOK_COMPONENT_SUB_ELEMENTS, ComponentStyleConfig, ComponentStyles, ComponentStylesConfig, ComponentsConfig, ContentConfig, CookbookComponentName, CookbookComponentStyles, CookbookComponentSubElementName, DocsAsset, DocsConfig, DocsDiagnostic, DocsEntry, DocsFrontmatter, DocsGraph, DocsRoute, DocsSource, EditLinkConfig, HeadConfig, LocaleConfig, MarkdownConfig, NavigationConfig, NavigationItem, NavigationPlacement, NavigationTab, SearchConfig, SiteConfig, SiteIconConfig, ThemeConfig, ThemePaletteConfig, ThemeTokenValue, ThemeTokens, TypographyPreset, TypographyPresets, defineDocsConfig, mergeDocsConfig } from "@tenphi/docs";
|
|
4
|
+
export { type BrandConfig, type BuildConfig, COOKBOOK_COMPONENT_NAMES, COOKBOOK_COMPONENT_SUB_ELEMENTS, type ComponentStyleConfig, type ComponentStyles, type ComponentStylesConfig, type ComponentsConfig, type ContentConfig, type CookbookComponentName, type CookbookComponentStyles, type CookbookComponentSubElementName, type CookbookOptions, DEFAULT_THEME_TOKENS, DEFAULT_TYPOGRAPHY_PRESETS, type DocsAsset, type DocsConfig, type DocsDiagnostic, type DocsEntry, type DocsFrontmatter, type DocsGraph, type DocsRoute, type DocsSource, type EditLinkConfig, type HeadConfig, type LocaleConfig, type MarkdownConfig, type NavigationConfig, type NavigationItem, type NavigationPlacement, type NavigationTab, type SearchConfig, type SiteConfig, type SiteIconConfig, type ThemeConfig, type ThemePaletteConfig, type ThemeTokenValue, type ThemeTokens, type TypographyPreset, type TypographyPresets, starlight_default as default, defineDocsConfig, mergeDocsConfig };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import starlight_default, { DEFAULT_THEME_TOKENS, DEFAULT_TYPOGRAPHY_PRESETS } from "@tenphi/starlight";
|
|
3
|
-
import { COOKBOOK_COMPONENT_NAMES, COOKBOOK_COMPONENT_SUB_ELEMENTS, defineDocsConfig } from "@tenphi/docs";
|
|
4
|
-
export { COOKBOOK_COMPONENT_NAMES, COOKBOOK_COMPONENT_SUB_ELEMENTS, DEFAULT_THEME_TOKENS, DEFAULT_TYPOGRAPHY_PRESETS, starlight_default as default, defineDocsConfig };
|
|
3
|
+
import { COOKBOOK_COMPONENT_NAMES, COOKBOOK_COMPONENT_SUB_ELEMENTS, defineDocsConfig, mergeDocsConfig } from "@tenphi/docs";
|
|
4
|
+
export { COOKBOOK_COMPONENT_NAMES, COOKBOOK_COMPONENT_SUB_ELEMENTS, DEFAULT_THEME_TOKENS, DEFAULT_TYPOGRAPHY_PRESETS, starlight_default as default, defineDocsConfig, mergeDocsConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tenphi/cookbook",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Repository-native static documentation for Astro",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -25,10 +25,19 @@
|
|
|
25
25
|
"./styling": {
|
|
26
26
|
"types": "./dist/styling.d.ts",
|
|
27
27
|
"import": "./dist/styling.js"
|
|
28
|
+
},
|
|
29
|
+
"./eslint-plugin": {
|
|
30
|
+
"types": "./dist/eslint-plugin.d.ts",
|
|
31
|
+
"import": "./dist/eslint-plugin.js"
|
|
32
|
+
},
|
|
33
|
+
"./config": {
|
|
34
|
+
"types": "./dist/config.d.ts",
|
|
35
|
+
"import": "./dist/config.js"
|
|
28
36
|
}
|
|
29
37
|
},
|
|
30
38
|
"files": [
|
|
31
39
|
"dist",
|
|
40
|
+
"tasty.config.mjs",
|
|
32
41
|
"README.md",
|
|
33
42
|
"LICENSE"
|
|
34
43
|
],
|
|
@@ -50,15 +59,14 @@
|
|
|
50
59
|
"author": "Andrey Yamanov",
|
|
51
60
|
"license": "MIT",
|
|
52
61
|
"dependencies": {
|
|
53
|
-
"@tenphi/docs": "0.
|
|
54
|
-
"@tenphi/starlight": "0.
|
|
55
|
-
"jiti": "^2.6.1"
|
|
62
|
+
"@tenphi/docs": "0.15.0",
|
|
63
|
+
"@tenphi/starlight": "0.15.0"
|
|
56
64
|
},
|
|
57
65
|
"peerDependencies": {
|
|
58
|
-
"astro": "^7.2
|
|
66
|
+
"astro": "^7.3.2"
|
|
59
67
|
},
|
|
60
68
|
"devDependencies": {
|
|
61
|
-
"astro": "^7.2
|
|
69
|
+
"astro": "^7.3.2",
|
|
62
70
|
"@types/node": "^22.15.2",
|
|
63
71
|
"tsdown": "^0.22.14",
|
|
64
72
|
"typescript": "^7.0.2",
|
package/tasty.config.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { validationConfig as default } from "./dist/eslint-plugin.js";
|