create-the-docs 0.0.1-alpha.4

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.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env node
2
+ import { cp, mkdir, readFile, readdir, rename, writeFile } from "node:fs/promises";
3
+ import { basename, dirname, join, resolve } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..");
6
+ const targetArgument = process.argv[2];
7
+ if (targetArgument === "--help" || targetArgument === "-h") {
8
+ console.log("Usage: pnpm create the-docs [directory]");
9
+ process.exit(0);
10
+ }
11
+ const target = resolve(process.cwd(), targetArgument ?? "the-docs-site");
12
+ await mkdir(target, { recursive: true });
13
+ if ((await readdir(target)).length > 0) {
14
+ console.error(`Cannot create a project in non-empty directory: ${target}`);
15
+ process.exit(1);
16
+ }
17
+ await cp(join(packageRoot, "template"), target, { recursive: true });
18
+ await rename(join(target, "gitignore"), join(target, ".gitignore"));
19
+ const packageFile = join(target, "package.json");
20
+ const packageJson = JSON.parse(await readFile(packageFile, "utf8"));
21
+ packageJson.name = basename(target);
22
+ await writeFile(packageFile, `${JSON.stringify(packageJson, null, 2)}\n`);
23
+ console.log(`Created The Docs project in ${target}`);
24
+ console.log("");
25
+ console.log("Next steps:");
26
+ console.log(` cd ${targetArgument ?? "the-docs-site"}`);
27
+ console.log(" pnpm install");
28
+ console.log(" pnpm dev");
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,Q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AC,MAAM,EAAE,cAAc,CAAC,CAAA;AAChD,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,CAEjE,CAAA;AACD,WAAW,CAAC,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAA;AACnC,MAAM,SAAS,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAA;AAEzE,OAAO,CAAC,GAAG,CAAC,+BAA+B,MAAM,EAAE,CAAC,CAAA;AACpD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;AACf,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;AAC1B,OAAO,CAAC,GAAG,CAAC,QAAQ,cAAc,IAAI,eAAe,EAAE,CAAC,CAAA;AACxD,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;AAC7B,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA"}
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "create-the-docs",
3
+ "version": "0.0.1-alpha.4",
4
+ "description": "Create a documentation site powered by The Docs",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "bin": {
8
+ "create-the-docs": "./dist/index.js"
9
+ },
10
+ "files": [
11
+ "dist",
12
+ "template"
13
+ ],
14
+ "engines": {
15
+ "node": ">=24"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/thspacecode/the-docs.git",
20
+ "directory": "packages/create-the-docs"
21
+ },
22
+ "publishConfig": {
23
+ "access": "public"
24
+ },
25
+ "devDependencies": {
26
+ "@types/node": "^24",
27
+ "typescript": "^6"
28
+ },
29
+ "scripts": {
30
+ "build": "rm -rf dist && tsc -p tsconfig.json --noEmit false --declaration --declarationMap --sourceMap --outDir dist --rootDir src --allowImportingTsExtensions false",
31
+ "format": "prettier --write \"**/*.{ts,tsx}\"",
32
+ "typecheck": "tsc --noEmit"
33
+ }
34
+ }
@@ -0,0 +1 @@
1
+ export { ErrorBoundary, Layout, default } from "@the-docs/preset-default/root"
@@ -0,0 +1,3 @@
1
+ import { createRoutes } from "@the-docs/preset-default/routes"
2
+
3
+ export default createRoutes()
@@ -0,0 +1,8 @@
1
+ ---
2
+ title: Getting Started
3
+ description: Your first document powered by The Docs.
4
+ ---
5
+
6
+ ## Welcome
7
+
8
+ Edit `docs/getting-started/index.mdx` to start writing your documentation.
@@ -0,0 +1,5 @@
1
+ import { defineConfig } from "@the-docs/preset-default"
2
+
3
+ export default defineConfig({
4
+ contentRoot: new URL("./docs", import.meta.url),
5
+ })
@@ -0,0 +1,3 @@
1
+ node_modules/
2
+ .react-router/
3
+ .build/
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "the-docs-site",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "react-router dev",
8
+ "build": "react-router build",
9
+ "start": "react-router-serve ./.build/server/index.js",
10
+ "typecheck": "react-router typegen && tsc"
11
+ },
12
+ "dependencies": {
13
+ "@react-router/node": "7.15.1",
14
+ "@react-router/serve": "7.15.1",
15
+ "@the-docs/preset-default": "^0.0.1-alpha.4",
16
+ "isbot": "^5",
17
+ "react": "^19.2.6",
18
+ "react-dom": "^19.2.6",
19
+ "react-router": "7.15.1"
20
+ },
21
+ "devDependencies": {
22
+ "@react-router/dev": "7.15.1",
23
+ "@types/node": "^24",
24
+ "@types/react": "^19",
25
+ "@types/react-dom": "^19",
26
+ "typescript": "^6",
27
+ "vite": "8.0.16"
28
+ },
29
+ "engines": {
30
+ "node": ">=24"
31
+ }
32
+ }
@@ -0,0 +1,5 @@
1
+ import { createReactRouterConfig } from "@the-docs/preset-default/react-router"
2
+
3
+ import docsConfig from "./docs.config.ts"
4
+
5
+ export default createReactRouterConfig(docsConfig)
@@ -0,0 +1,19 @@
1
+ {
2
+ "include": ["**/*", ".react-router/types/**/*"],
3
+ "compilerOptions": {
4
+ "lib": ["DOM", "DOM.Iterable", "ES2022"],
5
+ "types": ["node", "vite/client"],
6
+ "target": "ES2022",
7
+ "module": "ES2022",
8
+ "moduleResolution": "bundler",
9
+ "allowImportingTsExtensions": true,
10
+ "jsx": "react-jsx",
11
+ "rootDirs": [".", "./.react-router/types"],
12
+ "esModuleInterop": true,
13
+ "verbatimModuleSyntax": true,
14
+ "noEmit": true,
15
+ "resolveJsonModule": true,
16
+ "skipLibCheck": true,
17
+ "strict": true
18
+ }
19
+ }
@@ -0,0 +1,5 @@
1
+ import { createViteConfig } from "@the-docs/preset-default/vite"
2
+
3
+ import docsConfig from "./docs.config.ts"
4
+
5
+ export default createViteConfig(docsConfig)