@knowcode/doc-builder 1.0.3 → 1.0.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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,20 @@ 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.4] - 2025-01-19
9
+
10
+ ### Added
11
+ - Comprehensive Vercel CLI prompt explanations in help text
12
+ - Step-by-step answers for all Vercel setup questions
13
+ - Hints in prompts to guide users through setup
14
+ - Pre-deployment guidance showing what Vercel will ask
15
+ - Better project name sanitization for Vercel URLs
16
+
17
+ ### Improved
18
+ - More detailed deployment help with exact answers to provide
19
+ - Clearer instructions for first-time vs. subsequent deployments
20
+ - Visual question/answer format in help documentation
21
+
8
22
  ## [1.0.3] - 2025-01-19
9
23
 
10
24
  ### Fixed
package/cli.js CHANGED
@@ -141,11 +141,36 @@ ${chalk.yellow('First-time Vercel Setup:')}
141
141
  ${chalk.cyan('3. Run doc-builder deploy:')}
142
142
  ${chalk.gray('$')} npx @knowcode/doc-builder deploy
143
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
144
+ You'll be asked several questions:
145
+
146
+ ${chalk.green('Q: Would you like to set up a new Vercel project?')}
147
+ Answer: ${chalk.yellow('Yes')} (first time only)
148
+
149
+ ${chalk.green('Q: What is your project name?')}
150
+ → Answer: ${chalk.yellow('Your project name')} (e.g., "my-docs" or "gasworld")
151
+
152
+ ${chalk.green('Q: Which framework preset?')}
153
+ → Answer: ${chalk.yellow('Other (Static HTML)')} (always choose this)
154
+
155
+ ${chalk.green('Q: Make the deployment publicly accessible?')}
156
+ → Answer: ${chalk.yellow('Yes')} for public docs, ${chalk.yellow('No')} for private
157
+
158
+ ${chalk.gray('Then Vercel CLI will ask:')}
159
+
160
+ ${chalk.green('Q: Set up [your directory]?')}
161
+ → Answer: ${chalk.yellow('Yes')}
162
+
163
+ ${chalk.green('Q: Which scope should contain your project?')}
164
+ → Answer: ${chalk.yellow('Select your account')} (usually your username)
165
+
166
+ ${chalk.green('Q: Link to existing project?')}
167
+ → Answer: ${chalk.yellow('No')} (first time), ${chalk.yellow('Yes')} (if redeploying)
168
+
169
+ ${chalk.green('Q: In which directory is your code located?')}
170
+ → Answer: ${chalk.yellow('./html')} (or your output directory)
171
+
172
+ ${chalk.green('Q: Want to modify these settings?')}
173
+ → Answer: ${chalk.yellow('No')} (doc-builder handles this)
149
174
 
150
175
  ${chalk.cyan('4. Configure Access (Important!):')}
151
176
  After deployment, go to your Vercel dashboard:
package/lib/deploy.js CHANGED
@@ -25,7 +25,8 @@ async function setupVercelProject(config) {
25
25
  type: 'text',
26
26
  name: 'projectName',
27
27
  message: 'What is your project name?',
28
- initial: config.siteName || 'my-docs'
28
+ initial: config.siteName.toLowerCase().replace(/[^a-z0-9-]/g, '-') || 'my-docs',
29
+ hint: 'This will be your URL: project-name.vercel.app'
29
30
  },
30
31
  {
31
32
  type: 'select',
@@ -36,13 +37,15 @@ async function setupVercelProject(config) {
36
37
  { title: 'Next.js', value: 'nextjs' },
37
38
  { title: 'Vite', value: 'vite' }
38
39
  ],
39
- initial: 0
40
+ initial: 0,
41
+ hint: 'Choose "Other (Static HTML)" for doc-builder'
40
42
  },
41
43
  {
42
44
  type: 'confirm',
43
45
  name: 'publicAccess',
44
46
  message: 'Make the deployment publicly accessible?',
45
- initial: true
47
+ initial: true,
48
+ hint: 'Choose Yes for public docs, No for team-only access'
46
49
  }
47
50
  ]);
48
51
 
@@ -64,6 +67,13 @@ async function setupVercelProject(config) {
64
67
 
65
68
  // Run Vercel setup
66
69
  console.log(chalk.blue('\n🔗 Linking to Vercel...\n'));
70
+ console.log(chalk.yellow('📝 Vercel will now ask additional questions:\n'));
71
+ console.log(chalk.gray('• Set up [directory]? → Yes'));
72
+ console.log(chalk.gray('• Which scope? → Select your account'));
73
+ console.log(chalk.gray('• Link to existing? → No (first time)'));
74
+ console.log(chalk.gray('• Project name? → Same as above'));
75
+ console.log(chalk.gray('• Code directory? → ./html (or your output dir)'));
76
+ console.log(chalk.gray('• Modify settings? → No\n'));
67
77
 
68
78
  try {
69
79
  execSync('vercel link', { stdio: 'inherit' });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowcode/doc-builder",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Reusable documentation builder for markdown-based sites with Vercel deployment support",
5
5
  "main": "index.js",
6
6
  "bin": {