@docsector/docsector-reader 0.3.0 → 0.3.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 (2) hide show
  1. package/bin/docsector.js +29 -22
  2. package/package.json +1 -1
package/bin/docsector.js CHANGED
@@ -12,7 +12,7 @@
12
12
  */
13
13
 
14
14
  import { execSync, spawn } from 'child_process'
15
- import { existsSync, mkdirSync, writeFileSync } from 'fs'
15
+ import { existsSync, mkdirSync, writeFileSync, copyFileSync } from 'fs'
16
16
  import { resolve, dirname, basename } from 'path'
17
17
  import { fileURLToPath } from 'url'
18
18
 
@@ -23,7 +23,7 @@ const packageRoot = resolve(__dirname, '..')
23
23
  const args = process.argv.slice(2)
24
24
  const command = args[0]
25
25
 
26
- const VERSION = '0.3.0'
26
+ const VERSION = '0.3.2'
27
27
 
28
28
  const HELP = `
29
29
  Docsector Reader v${VERSION}
@@ -71,7 +71,7 @@ function getTemplatePackageJson (name) {
71
71
  serve: 'docsector serve'
72
72
  },
73
73
  dependencies: {
74
- '@docsector/docsector-reader': '^0.3.0',
74
+ '@docsector/docsector-reader': '^0.3.2',
75
75
  '@quasar/extras': '^1.16.12',
76
76
  'quasar': '^2.16.6',
77
77
  'vue': '^3.5.13',
@@ -673,19 +673,19 @@ const TEMPLATE_GETTING_STARTED_MD = `\
673
673
 
674
674
  Create a new Docsector documentation project:
675
675
 
676
- \\\`\\\`\\\`bash
676
+ \`\`\`bash
677
677
  npx @docsector/docsector-reader init my-docs
678
678
  cd my-docs
679
679
  npm install
680
- \\\`\\\`\\\`
680
+ \`\`\`
681
681
 
682
682
  ## Development Server
683
683
 
684
684
  Start the development server with hot-reload:
685
685
 
686
- \\\`\\\`\\\`bash
686
+ \`\`\`bash
687
687
  npm run dev
688
- \\\`\\\`\\\`
688
+ \`\`\`
689
689
 
690
690
  Open **http://localhost:8181** in your browser.
691
691
 
@@ -695,25 +695,25 @@ Here's an overview of the project files:
695
695
 
696
696
  | File / Folder | Description |
697
697
  | --- | --- |
698
- | \\\`docsector.config.js\\\` | Branding, links, languages, and GitHub config |
699
- | \\\`quasar.config.js\\\` | Quasar/Vite build configuration (via factory) |
700
- | \\\`src/pages/index.js\\\` | Page registry — defines all documentation pages |
701
- | \\\`src/pages/boot.js\\\` | Boot metadata for the home page |
702
- | \\\`src/pages/@/\\\` | Special pages (Home, 404) |
703
- | \\\`src/pages/guide/\\\` | Guide pages (Markdown files) |
704
- | \\\`src/i18n/languages/\\\` | Translation files (HJSON format) |
705
- | \\\`src/css/app.sass\\\` | Custom styles |
706
- | \\\`public/images/\\\` | Static assets (logo, flags, icons) |
698
+ | \`docsector.config.js\` | Branding, links, languages, and GitHub config |
699
+ | \`quasar.config.js\` | Quasar/Vite build configuration (via factory) |
700
+ | \`src/pages/index.js\` | Page registry — defines all documentation pages |
701
+ | \`src/pages/boot.js\` | Boot metadata for the home page |
702
+ | \`src/pages/@/\` | Special pages (Home, 404) |
703
+ | \`src/pages/guide/\` | Guide pages (Markdown files) |
704
+ | \`src/i18n/languages/\` | Translation files (HJSON format) |
705
+ | \`src/css/app.sass\` | Custom styles |
706
+ | \`public/images/\` | Static assets (logo, flags, icons) |
707
707
 
708
708
  ## Adding a Page
709
709
 
710
- 1. Register the page in \\\`src/pages/index.js\\\`
711
- 2. Create the Markdown file at \\\`src/pages/{type}/{path}.overview.{lang}.md\\\`
710
+ 1. Register the page in \`src/pages/index.js\`
711
+ 2. Create the Markdown file at \`src/pages/{type}/{path}.overview.{lang}.md\`
712
712
  3. The page will automatically appear in the sidebar navigation
713
713
 
714
714
  ## Customization
715
715
 
716
- Edit \\\`docsector.config.js\\\` to change:
716
+ Edit \`docsector.config.js\` to change:
717
717
 
718
718
  - **Branding** — logo, name, version
719
719
  - **Links** — GitHub, changelog, sponsor
@@ -722,11 +722,11 @@ Edit \\\`docsector.config.js\\\` to change:
722
722
 
723
723
  ## Building for Production
724
724
 
725
- \\\`\\\`\\\`bash
725
+ \`\`\`bash
726
726
  npm run build
727
- \\\`\\\`\\\`
727
+ \`\`\`
728
728
 
729
- The optimized SPA output will be in \\\`dist/spa/\\\`.
729
+ The optimized SPA output will be in \`dist/spa/\`.
730
730
  `
731
731
 
732
732
  // =============================================================================
@@ -836,6 +836,12 @@ function initProject (name) {
836
836
  writeFileSync(resolve(projectDir, filePath), content, 'utf-8')
837
837
  }
838
838
 
839
+ // Copy logo from package
840
+ const packageLogo = resolve(packageRoot, 'public/images/logo.png')
841
+ if (existsSync(packageLogo)) {
842
+ copyFileSync(packageLogo, resolve(projectDir, 'public/images/logo.png'))
843
+ }
844
+
839
845
  console.log(' Project structure:')
840
846
  console.log(` ${name}/`)
841
847
  console.log(' ├── docsector.config.js')
@@ -846,6 +852,7 @@ function initProject (name) {
846
852
  console.log(' ├── .gitignore')
847
853
  console.log(' ├── public/')
848
854
  console.log(' │ └── images/')
855
+ console.log(' │ └── logo.png')
849
856
  console.log(' └── src/')
850
857
  console.log(' ├── css/')
851
858
  console.log(' │ └── app.sass')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docsector/docsector-reader",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "A documentation rendering engine built with Vue 3, Quasar v2 and Vite. Transform Markdown into beautiful, navigable documentation sites.",
5
5
  "productName": "Docsector Reader",
6
6
  "author": "Rodrigo de Araujo Vieira",