@knowcode/doc-builder 1.0.1 → 1.0.2

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/CHANGELOG.md +15 -0
  2. package/cli.js +64 -10
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,21 @@ All notable changes to @knowcode/doc-builder will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.2] - 2025-01-19
9
+
10
+ ### Fixed
11
+ - Fixed remaining JUNO references in CLI help text
12
+ - Enhanced help documentation with detailed Vercel CLI setup instructions
13
+ - Added comprehensive deployment troubleshooting guide
14
+ - Improved Quick Start section with step-by-step instructions
15
+ - Added "What gets created" explanations for init command
16
+
17
+ ### Added
18
+ - Requirements section in main help
19
+ - Example for creating docs from scratch
20
+ - Vercel installation options (npm and Homebrew)
21
+ - Clear instructions for disabling Vercel deployment protection
22
+
8
23
  ## [1.0.1] - 2025-01-19
9
24
 
10
25
  ### Fixed
package/cli.js CHANGED
@@ -25,7 +25,7 @@ program
25
25
  .description(packageJson.description)
26
26
  .version(packageJson.version)
27
27
  .addHelpText('before', `
28
- ${chalk.cyan('🚀 @juno/doc-builder')} - Transform your markdown into beautiful documentation sites
28
+ ${chalk.cyan('🚀 @knowcode/doc-builder')} - Transform your markdown into beautiful documentation sites
29
29
 
30
30
  ${chalk.yellow('What it does:')}
31
31
  • Converts markdown files to static HTML with a beautiful Notion-inspired theme
@@ -34,10 +34,24 @@ ${chalk.yellow('What it does:')}
34
34
  • Deploys to Vercel with one command (zero configuration)
35
35
  • Optional authentication to protect private documentation
36
36
 
37
+ ${chalk.yellow('Requirements:')}
38
+ • Node.js 14+ installed
39
+ • A ${chalk.cyan('docs/')} folder with markdown files (or specify custom folder)
40
+ • Vercel CLI for deployment (optional)
41
+
37
42
  ${chalk.yellow('Quick Start:')}
38
- ${chalk.gray('$')} npx @juno/doc-builder ${chalk.gray('# Build and deploy to Vercel')}
39
- ${chalk.gray('$')} npx @juno/doc-builder build ${chalk.gray('# Build HTML files only')}
40
- ${chalk.gray('$')} npx @juno/doc-builder dev ${chalk.gray('# Start development server')}
43
+ ${chalk.cyan('1. Create your docs:')}
44
+ ${chalk.gray('$')} mkdir docs
45
+ ${chalk.gray('$')} echo "# My Documentation" > docs/README.md
46
+
47
+ ${chalk.cyan('2. Build and deploy:')}
48
+ ${chalk.gray('$')} npx @knowcode/doc-builder ${chalk.gray('# Build and deploy to Vercel')}
49
+ ${chalk.gray(' or')}
50
+ ${chalk.gray('$')} npx @knowcode/doc-builder build ${chalk.gray('# Build HTML files only')}
51
+ ${chalk.gray('$')} npx @knowcode/doc-builder dev ${chalk.gray('# Start development server')}
52
+
53
+ ${chalk.yellow('No docs folder yet?')}
54
+ ${chalk.gray('$')} npx @knowcode/doc-builder init --example ${chalk.gray('# Create example docs')}
41
55
  `);
42
56
 
43
57
  // Build command
@@ -113,13 +127,40 @@ ${chalk.yellow('Examples:')}
113
127
  ${chalk.gray('$')} doc-builder deploy --prod ${chalk.gray('# Deploy to production')}
114
128
  ${chalk.gray('$')} doc-builder deploy --no-build ${chalk.gray('# Deploy existing build')}
115
129
 
116
- ${chalk.yellow('First-time setup:')}
117
- The tool will guide you through:
118
- 1. Installing Vercel CLI (if needed)
119
- 2. Creating a new Vercel project
120
- 3. Configuring deployment settings
130
+ ${chalk.yellow('First-time Vercel Setup:')}
131
+
132
+ ${chalk.cyan('1. Install Vercel CLI:')}
133
+ ${chalk.gray('$')} npm install -g vercel
134
+ ${chalk.gray(' or')}
135
+ ${chalk.gray('$')} brew install vercel ${chalk.gray('# macOS with Homebrew')}
136
+
137
+ ${chalk.cyan('2. Login to Vercel:')}
138
+ ${chalk.gray('$')} vercel login
139
+ ${chalk.gray(' This will open your browser to authenticate')}
121
140
 
122
- ${chalk.yellow('Important:')} After deployment, disable Vercel Authentication in project settings for public docs.
141
+ ${chalk.cyan('3. Run doc-builder deploy:')}
142
+ ${chalk.gray('$')} npx @knowcode/doc-builder deploy
143
+
144
+ The tool will:
145
+ • Create a new Vercel project
146
+ • Link it to your documentation
147
+ • Deploy your site
148
+ • Provide you with a URL
149
+
150
+ ${chalk.cyan('4. Configure Access (Important!):')}
151
+ After deployment, go to your Vercel dashboard:
152
+ • Navigate to Project Settings → General
153
+ • Under "Deployment Protection", set to ${chalk.yellow('Disabled')}
154
+ • This allows public access to your docs
155
+
156
+ ${chalk.yellow('Subsequent Deployments:')}
157
+ ${chalk.gray('$')} npx @knowcode/doc-builder ${chalk.gray('# Deploy preview')}
158
+ ${chalk.gray('$')} npx @knowcode/doc-builder deploy --prod ${chalk.gray('# Deploy to production')}
159
+
160
+ ${chalk.yellow('Troubleshooting:')}
161
+ • ${chalk.cyan('Command not found:')} Install Vercel CLI globally
162
+ • ${chalk.cyan('Not authenticated:')} Run ${chalk.gray('vercel login')}
163
+ • ${chalk.cyan('Project not linked:')} Delete ${chalk.gray('.vercel')} folder and redeploy
123
164
  `)
124
165
  .action(async (options) => {
125
166
  const spinner = ora('Deploying to Vercel...').start();
@@ -169,6 +210,19 @@ program
169
210
  ${chalk.yellow('Examples:')}
170
211
  ${chalk.gray('$')} doc-builder init --config ${chalk.gray('# Create doc-builder.config.js')}
171
212
  ${chalk.gray('$')} doc-builder init --example ${chalk.gray('# Create example docs folder')}
213
+ ${chalk.gray('$')} doc-builder init --example --config ${chalk.gray('# Create both')}
214
+
215
+ ${chalk.yellow('What gets created:')}
216
+ ${chalk.cyan('--example:')} Creates a docs/ folder with:
217
+ • README.md with welcome message and mermaid diagram
218
+ • getting-started.md with setup instructions
219
+ • guides/configuration.md with config options
220
+
221
+ ${chalk.cyan('--config:')} Creates doc-builder.config.js with:
222
+ • Site name and description
223
+ • Feature toggles (auth, dark mode, etc.)
224
+ • Directory paths
225
+ • Authentication settings
172
226
  `)
173
227
  .action(async (options) => {
174
228
  if (options.config) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowcode/doc-builder",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Reusable documentation builder for markdown-based sites with Vercel deployment support",
5
5
  "main": "index.js",
6
6
  "bin": {