undocs 0.2.1 → 0.2.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.
@@ -25,7 +25,7 @@ export function createCLI(opts: DocsCLIOptions = {}) {
25
25
  },
26
26
  args: { ...sharedArgs },
27
27
  async setup({ args }) {
28
- const { appDir, nuxtConfig } = await setupDocs(args.dir, opts.setup)
28
+ const { appDir, nuxtConfig } = await setupDocs(args.dir, { ...opts.setup, dev: true })
29
29
  process.chdir(appDir)
30
30
  await import('nuxi').then((nuxi) =>
31
31
  nuxi.runCommand('dev', [appDir, '--no-fork', '--port', '4000'], { overrides: nuxtConfig }),
@@ -10,6 +10,7 @@ const pkgDir = fileURLToPath(new URL('../../..', import.meta.url))
10
10
 
11
11
  export interface SetupDocsOptions {
12
12
  defaults?: DocsConfig
13
+ dev?: boolean
13
14
  extends?: string[]
14
15
  }
15
16
 
@@ -21,7 +22,7 @@ export async function setupDocs(docsDir: string, opts: SetupDocsOptions = {}) {
21
22
  docsconfig.dir = docsDir = resolve(docsconfig.dir || docsDir)
22
23
 
23
24
  // URL is required for production build (SEO)
24
- if (!docsconfig.url) {
25
+ if (!docsconfig.url && !opts.dev) {
25
26
  throw new Error('`url` config is required for production build!')
26
27
  }
27
28
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "undocs",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "repository": "unjs/undocs",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -36,7 +36,7 @@
36
36
  "@nuxtjs/plausible": "^0.2.4",
37
37
  "@nuxtjs/seo": "^2.0.0-rc.8",
38
38
  "@nuxtjs/tailwindcss": "^6.11.3",
39
- "c12": "^1.6.1",
39
+ "c12": "^1.7.0",
40
40
  "citty": "^0.1.5",
41
41
  "consola": "^3.2.3",
42
42
  "defu": "^6.1.4",