@vkuttyp/create-docus 5.4.3

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.
Files changed (3) hide show
  1. package/README.md +159 -0
  2. package/dist/main.mjs +50 -0
  3. package/package.json +38 -0
package/README.md ADDED
@@ -0,0 +1,159 @@
1
+ [![docus](https://docus.dev/__og-image__/static/og.png)](https://docus.dev)
2
+
3
+ > CLI tool to create beautiful docs with Markdown
4
+
5
+ [![npm version](https://img.shields.io/npm/v/create-docus.svg?style=flat&colorA=020420&colorB=EEEEEE)](https://npmjs.com/package/create-docus)
6
+ [![npm downloads](https://img.shields.io/npm/dm/create-docus.svg?style=flat&colorA=020420&colorB=EEEEEE)](https://npm.chart.dev/create-docus)
7
+ [![License](https://img.shields.io/npm/l/create-docus.svg?style=flat&colorA=020420&colorB=EEEEEE)](https://npmjs.com/package/create-docus)
8
+
9
+ The fastest way to create a new [Docus](https://docus.dev) documentation project. This CLI tool scaffolds a complete documentation website using the [`docus`](https://www.github.com/nuxt-content/docus/tree/main/layer) Nuxt layer.
10
+
11
+ ## 🚀 Quick Start
12
+
13
+ Create a new documentation project in seconds:
14
+
15
+ ```bash
16
+ # Create a new project
17
+ npx create-docus my-docs
18
+
19
+ # Or create with i18n template for multi-language docs
20
+ npx create-docus my-docs -t i18n
21
+
22
+ # Navigate to your project
23
+ cd my-docs
24
+
25
+ # Start development server
26
+ npm run dev
27
+ ```
28
+
29
+ That's it! Your documentation site will be running at `http://localhost:3000`
30
+
31
+ ## 🌍 Templates
32
+
33
+ ### Default Template
34
+ Creates a basic documentation project ready for single-language content.
35
+
36
+ ### I18n Template
37
+ Use the `-t i18n` flag to create a project with internationalization support:
38
+
39
+ ```bash
40
+ npx create-docus my-docs -t i18n
41
+ ```
42
+
43
+ The i18n template includes:
44
+ - Pre-configured `@nuxtjs/i18n` module
45
+ - Locale-based content structure (`content/en/`, `content/fr/`)
46
+ - Built-in language switcher
47
+ - Automatic URL prefixing (`/en/docs`, `/fr/docs`)
48
+
49
+ ## 🎯 What it creates
50
+
51
+ The CLI scaffolds a complete documentation project with:
52
+
53
+ - ✨ **Beautiful Design** - Clean, modern documentation theme
54
+ - 📱 **Responsive** - Mobile-first responsive design
55
+ - 🌙 **Dark Mode** - Built-in dark/light mode support
56
+ - 🌍 **Internationalization** - Native i18n support for multi-language docs
57
+ - 🔍 **Search** - Full-text search functionality
58
+ - 📝 **Markdown Enhanced** - Extended markdown with custom components
59
+ - 🎨 **Customizable** - Easy theming and brand customization
60
+ - ⚡ **Fast** - Optimized for performance with Nuxt 4
61
+ - 🔧 **TypeScript** - Full TypeScript support
62
+
63
+ ## 📁 Project Structure
64
+
65
+ ### Generated project
66
+
67
+ ```
68
+ my-docs/
69
+ ├── content/ # Your markdown content
70
+ │ ├── index.md # Homepage
71
+ │ └── docs/ # Documentation pages
72
+ ├── public/ # Static assets
73
+ └── package.json # Dependencies and scripts
74
+ ```
75
+
76
+ ### Optional files and folders
77
+
78
+ Docus uses a layer system, you can go further and use any feature or file of a classical Nuxt project:
79
+
80
+ ```
81
+ my-docs/
82
+ ├── app.config.ts # App configuration
83
+ ├── nuxt.config.ts # Nuxt configuration (add extra modules, components, etc.)
84
+ ├── app/ # App directory
85
+ │ ├── components/ # Components (add your own components)
86
+ │ ├── layouts/ # Layouts (add your own layouts)
87
+ │ └── pages/ # Pages (add your own pages)
88
+ └── server/ # Server-side code (add your own server-side code)
89
+ ```
90
+
91
+ ### `/content` folder structure
92
+
93
+ **Single language structure:**
94
+ ```
95
+ content/
96
+ ├── index.md
97
+ ├── getting-started.md
98
+ └── guide/
99
+ ├── introduction.md
100
+ └── configuration.md
101
+ ```
102
+
103
+ **Multi-language structure (with i18n):**
104
+ ```
105
+ content/
106
+ ├── en/
107
+ │ ├── index.md
108
+ │ └── guide/
109
+ │ └── introduction.md
110
+ └── fr/
111
+ ├── index.md
112
+ └── guide/
113
+ └── introduction.md
114
+ ```
115
+
116
+ ## ⚡ Built with
117
+
118
+ Your project comes pre-configured with the best of the Nuxt ecosystem:
119
+
120
+ - [Nuxt 4](https://nuxt.com) - The web framework
121
+ - [Nuxt Content](https://content.nuxt.com/) - File-based CMS
122
+ - [Nuxt UI](https://ui.nuxt.com) - UI components
123
+ - [Nuxt Image](https://image.nuxt.com/) - Optimized images
124
+ - [Tailwind CSS 4](https://tailwindcss.com/) - Utility-first CSS
125
+ - [Docus Layer](https://www.npmjs.com/package/docus) - Documentation theme
126
+
127
+ ## 🔗 Related Packages
128
+
129
+ - [`docus`](https://github.com/nuxt-content/docus/tree/main/layer) - The Nuxt layer that powers your documentation
130
+
131
+ ## 📖 Documentation
132
+
133
+ For detailed documentation on customizing your Docus project, visit the [Docus Documentation](https://docus.dev)
134
+
135
+ ## 🛠️ Development
136
+
137
+ This repository contains the CLI tool source code.
138
+
139
+ ### Local Development
140
+
141
+ To contribute to the CLI tool:
142
+
143
+ ```bash
144
+ # Clone this repository
145
+ git clone https://github.com/nuxt-content/docus
146
+
147
+ # Install dependencies
148
+ bun install
149
+
150
+ # Build the CLI
151
+ bun run build
152
+
153
+ # Run the dev server to run the docus docs
154
+ bun run dev
155
+ ```
156
+
157
+ ## 📄 License
158
+
159
+ Published under the [MIT](https://github.com/nuxt-content/docus/blob/main/LICENSE) license.
package/dist/main.mjs ADDED
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env node
2
+
3
+ // cli.ts
4
+ import { resolve } from "path";
5
+ import { defineCommand, runMain } from "citty";
6
+ function createCLI(opts) {
7
+ const main = defineCommand({
8
+ meta: {
9
+ name: opts.name,
10
+ description: opts.description
11
+ },
12
+ args: {
13
+ dir: {
14
+ type: "positional",
15
+ description: "Project directory",
16
+ required: false,
17
+ default: "docs"
18
+ },
19
+ template: {
20
+ type: "string",
21
+ alias: "t",
22
+ description: "Template to use (default, i18n)",
23
+ required: false,
24
+ default: "default"
25
+ }
26
+ },
27
+ async setup(context) {
28
+ const dir = resolve(context.args.dir);
29
+ const template = context.args.template;
30
+ if (!["i18n", "default"].includes(template)) {
31
+ throw new Error("Invalid template");
32
+ }
33
+ const { runCommand } = await import("@nuxt/cli");
34
+ await runCommand("init", [dir, "-t", `gh:nuxt-content/docus/.starters/${template}`]);
35
+ }
36
+ });
37
+ return {
38
+ runMain: () => runMain(main)
39
+ };
40
+ }
41
+
42
+ // main.ts
43
+ var cli = createCLI({
44
+ name: "create-docus",
45
+ description: "Create a new Docus documentation project",
46
+ setup: {
47
+ defaults: {}
48
+ }
49
+ });
50
+ cli.runMain();
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@vkuttyp/create-docus",
3
+ "description": "CLI for creating Docus documentation projects",
4
+ "version": "5.4.3",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/nuxt-content/docus.git"
8
+ },
9
+ "private": false,
10
+ "license": "MIT",
11
+ "bin": {
12
+ "create-docus": "dist/main.mjs"
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "scripts": {
18
+ "prepare": "bun run build",
19
+ "build": "tsup-node ./main.ts --format esm",
20
+ "dev": "tsx ./main.ts"
21
+ },
22
+ "dependencies": {
23
+ "@nuxt/cli": "3.31.3",
24
+ "@nuxt/kit": "^4.2.2",
25
+ "c12": "^3.3.3",
26
+ "citty": "^0.1.6",
27
+ "defu": "^6.1.4",
28
+ "scule": "^1.3.0",
29
+ "ufo": "^1.6.1",
30
+ "unctx": "^2.5.0"
31
+ },
32
+ "devDependencies": {
33
+ "@types/node": "^25.0.3",
34
+ "tsup": "^8.5.1",
35
+ "tsx": "^4.21.0"
36
+ },
37
+ "packageManager": "bun@1.3.5"
38
+ }