@alliance-droid/svelte-docs-system 0.0.2 → 0.1.0

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 (185) hide show
  1. package/README.md +155 -23
  2. package/dist/components/APITable.svelte.d.ts +21 -0
  3. package/dist/components/Breadcrumbs.svelte.d.ts +14 -0
  4. package/dist/components/Callout.svelte.d.ts +15 -0
  5. package/dist/components/CodeBlock.svelte.d.ts +12 -0
  6. package/{src/lib → dist}/components/DocLayout.svelte +18 -6
  7. package/dist/components/DocLayout.svelte.d.ts +18 -0
  8. package/dist/components/DocsPage.svelte +39 -0
  9. package/dist/components/DocsPage.svelte.d.ts +8 -0
  10. package/dist/components/Documentation.svelte +639 -0
  11. package/dist/components/Footer.svelte.d.ts +10 -0
  12. package/dist/components/Image.svelte.d.ts +15 -0
  13. package/{src/lib → dist}/components/Navbar.svelte +4 -4
  14. package/dist/components/Navbar.svelte.d.ts +10 -0
  15. package/{src/lib → dist}/components/Search.svelte +2 -2
  16. package/dist/components/Search.svelte.d.ts +6 -0
  17. package/{template-starter/src/lib → dist}/components/Sidebar.svelte +2 -2
  18. package/dist/components/Sidebar.svelte.d.ts +9 -0
  19. package/dist/components/Tabs.svelte.d.ts +16 -0
  20. package/dist/config.d.ts +93 -0
  21. package/dist/config.js +89 -0
  22. package/dist/configLoader.d.ts +48 -0
  23. package/dist/configLoader.js +187 -0
  24. package/dist/configParser.d.ts +27 -0
  25. package/dist/configParser.js +208 -0
  26. package/{template-starter/src/lib/index.ts → dist/index.d.ts} +6 -7
  27. package/dist/index.js +18 -0
  28. package/dist/navigationBuilder.d.ts +64 -0
  29. package/dist/navigationBuilder.js +225 -0
  30. package/dist/plugin.d.ts +30 -0
  31. package/dist/plugin.js +172 -0
  32. package/dist/routing.d.ts +48 -0
  33. package/dist/routing.js +92 -0
  34. package/dist/stores/i18n.d.ts +20 -0
  35. package/dist/stores/i18n.js +119 -0
  36. package/dist/stores/nav.d.ts +20 -0
  37. package/dist/stores/nav.js +15 -0
  38. package/dist/stores/search.d.ts +49 -0
  39. package/dist/stores/search.js +127 -0
  40. package/dist/stores/theme.d.ts +7 -0
  41. package/dist/stores/theme.js +152 -0
  42. package/dist/stores/version.d.ts +18 -0
  43. package/dist/stores/version.js +93 -0
  44. package/dist/themeCustomization.d.ts +46 -0
  45. package/dist/themeCustomization.js +188 -0
  46. package/dist/utils/highlight.d.ts +13 -0
  47. package/dist/utils/highlight.js +83 -0
  48. package/dist/utils/index.d.ts +1 -0
  49. package/dist/utils/index.js +1 -0
  50. package/dist/utils/markdown.d.ts +40 -0
  51. package/dist/utils/markdown.js +165 -0
  52. package/package.json +44 -23
  53. package/COMPONENTS.md +0 -365
  54. package/COVERAGE_REPORT.md +0 -663
  55. package/SEARCH_VERIFICATION.md +0 -229
  56. package/TEST_SUMMARY.md +0 -344
  57. package/bin/init.js +0 -821
  58. package/docs/COMPONENT_LIBRARY_INTEGRATION_REPORT.md +0 -153
  59. package/docs/DARK_MODE_AUDIT_REPORT.md +0 -403
  60. package/docs/E2E_TESTS.md +0 -354
  61. package/docs/TESTING.md +0 -754
  62. package/docs/THEME_INHERITANCE.md +0 -192
  63. package/docs/de/index.md +0 -41
  64. package/docs/en/COMPONENTS.md +0 -443
  65. package/docs/en/api/examples.md +0 -100
  66. package/docs/en/api/overview.md +0 -69
  67. package/docs/en/components/index.md +0 -622
  68. package/docs/en/config/navigation.md +0 -505
  69. package/docs/en/config/theme-and-colors.md +0 -395
  70. package/docs/en/getting-started/integration.md +0 -406
  71. package/docs/en/guides/common-setups.md +0 -651
  72. package/docs/en/index.md +0 -243
  73. package/docs/en/markdown.md +0 -102
  74. package/docs/en/routing.md +0 -64
  75. package/docs/en/setup.md +0 -52
  76. package/docs/en/troubleshooting.md +0 -704
  77. package/docs/es/index.md +0 -41
  78. package/docs/fr/index.md +0 -41
  79. package/docs/ja/index.md +0 -41
  80. package/pagefind.toml +0 -8
  81. package/postcss.config.js +0 -5
  82. package/src/app.css +0 -119
  83. package/src/app.d.ts +0 -13
  84. package/src/app.html +0 -11
  85. package/src/lib/components/APITable.test.ts +0 -153
  86. package/src/lib/components/Breadcrumbs.test.ts +0 -148
  87. package/src/lib/components/Callout.test.ts +0 -100
  88. package/src/lib/components/CodeBlock.test.ts +0 -133
  89. package/src/lib/components/Image.test.ts +0 -163
  90. package/src/lib/components/Sidebar.svelte +0 -110
  91. package/src/lib/components/Tabs.test.ts +0 -102
  92. package/src/lib/config.test.ts +0 -140
  93. package/src/lib/config.ts +0 -179
  94. package/src/lib/configIntegration.test.ts +0 -272
  95. package/src/lib/configLoader.ts +0 -231
  96. package/src/lib/configParser.test.ts +0 -217
  97. package/src/lib/configParser.ts +0 -234
  98. package/src/lib/index.ts +0 -37
  99. package/src/lib/integration.test.ts +0 -426
  100. package/src/lib/navigationBuilder.test.ts +0 -338
  101. package/src/lib/navigationBuilder.ts +0 -268
  102. package/src/lib/performance.test.ts +0 -369
  103. package/src/lib/routing.test.ts +0 -202
  104. package/src/lib/routing.ts +0 -127
  105. package/src/lib/search-functionality.test.ts +0 -493
  106. package/src/lib/stores/i18n.test.ts +0 -180
  107. package/src/lib/stores/i18n.ts +0 -143
  108. package/src/lib/stores/nav.ts +0 -36
  109. package/src/lib/stores/search.test.ts +0 -140
  110. package/src/lib/stores/search.ts +0 -162
  111. package/src/lib/stores/theme.test.ts +0 -117
  112. package/src/lib/stores/theme.ts +0 -167
  113. package/src/lib/stores/version.test.ts +0 -139
  114. package/src/lib/stores/version.ts +0 -111
  115. package/src/lib/themeCustomization.test.ts +0 -223
  116. package/src/lib/themeCustomization.ts +0 -212
  117. package/src/lib/utils/highlight.test.ts +0 -136
  118. package/src/lib/utils/highlight.ts +0 -100
  119. package/src/lib/utils/index.ts +0 -7
  120. package/src/lib/utils/markdown.test.ts +0 -357
  121. package/src/lib/utils/markdown.ts +0 -77
  122. package/src/routes/+layout.server.ts +0 -1
  123. package/src/routes/+layout.svelte +0 -29
  124. package/src/routes/+page.svelte +0 -165
  125. package/src/routes/quote-demo/+page.svelte +0 -141
  126. package/static/robots.txt +0 -3
  127. package/svelte.config.js +0 -15
  128. package/tailwind.config.ts +0 -55
  129. package/template-starter/.github/workflows/build.yml +0 -40
  130. package/template-starter/.github/workflows/deploy-github-pages.yml +0 -47
  131. package/template-starter/.github/workflows/deploy-netlify.yml +0 -41
  132. package/template-starter/.github/workflows/deploy-vercel.yml +0 -64
  133. package/template-starter/NPM-PACKAGE-SETUP.md +0 -233
  134. package/template-starter/README.md +0 -320
  135. package/template-starter/docs/_config.json +0 -39
  136. package/template-starter/docs/api/components.md +0 -257
  137. package/template-starter/docs/api/overview.md +0 -169
  138. package/template-starter/docs/guides/configuration.md +0 -145
  139. package/template-starter/docs/guides/github-pages-deployment.md +0 -254
  140. package/template-starter/docs/guides/netlify-deployment.md +0 -159
  141. package/template-starter/docs/guides/vercel-deployment.md +0 -131
  142. package/template-starter/docs/index.md +0 -49
  143. package/template-starter/docs/setup.md +0 -149
  144. package/template-starter/package.json +0 -31
  145. package/template-starter/pagefind.toml +0 -3
  146. package/template-starter/postcss.config.js +0 -5
  147. package/template-starter/src/app.css +0 -34
  148. package/template-starter/src/app.d.ts +0 -13
  149. package/template-starter/src/app.html +0 -11
  150. package/template-starter/src/lib/components/APITable.svelte +0 -120
  151. package/template-starter/src/lib/components/APITable.test.ts +0 -96
  152. package/template-starter/src/lib/components/Breadcrumbs.svelte +0 -85
  153. package/template-starter/src/lib/components/Breadcrumbs.test.ts +0 -82
  154. package/template-starter/src/lib/components/Callout.svelte +0 -60
  155. package/template-starter/src/lib/components/Callout.test.ts +0 -91
  156. package/template-starter/src/lib/components/CodeBlock.svelte +0 -68
  157. package/template-starter/src/lib/components/CodeBlock.test.ts +0 -62
  158. package/template-starter/src/lib/components/DocLayout.svelte +0 -84
  159. package/template-starter/src/lib/components/Footer.svelte +0 -78
  160. package/template-starter/src/lib/components/Image.svelte +0 -100
  161. package/template-starter/src/lib/components/Image.test.ts +0 -81
  162. package/template-starter/src/lib/components/Navbar.svelte +0 -141
  163. package/template-starter/src/lib/components/Search.svelte +0 -248
  164. package/template-starter/src/lib/components/Tabs.svelte +0 -48
  165. package/template-starter/src/lib/components/Tabs.test.ts +0 -89
  166. package/template-starter/src/routes/+layout.svelte +0 -28
  167. package/template-starter/src/routes/+page.svelte +0 -92
  168. package/template-starter/svelte.config.js +0 -17
  169. package/template-starter/tailwind.config.ts +0 -17
  170. package/template-starter/tsconfig.json +0 -13
  171. package/template-starter/vite.config.ts +0 -6
  172. package/tests/e2e/example.spec.ts +0 -345
  173. package/tsconfig.json +0 -20
  174. package/vite.config.ts +0 -6
  175. package/vitest.config.ts +0 -33
  176. package/vitest.setup.ts +0 -21
  177. /package/{src/lib → dist}/assets/favicon.svg +0 -0
  178. /package/{src/lib → dist}/components/APITable.svelte +0 -0
  179. /package/{src/lib → dist}/components/Breadcrumbs.svelte +0 -0
  180. /package/{src/lib → dist}/components/Callout.svelte +0 -0
  181. /package/{src/lib → dist}/components/CodeBlock.svelte +0 -0
  182. /package/{src/lib → dist}/components/Footer.svelte +0 -0
  183. /package/{src/lib → dist}/components/Image.svelte +0 -0
  184. /package/{src/lib → dist}/components/Tabs.svelte +0 -0
  185. /package/{src/lib → dist}/svelte-component-library.d.ts +0 -0
@@ -1,141 +0,0 @@
1
- <script>
2
- import { browser } from '$app/environment';
3
- let QuoteDisplay;
4
-
5
- if (browser) {
6
- import('$lib').then(mod => {
7
- QuoteDisplay = mod.QuoteDisplay;
8
- });
9
- }
10
- </script>
11
-
12
- <main class="mx-auto max-w-4xl px-6 py-12">
13
- <h1 class="mb-2 text-4xl font-bold">QuoteDisplay Component</h1>
14
- <p class="mb-8 text-gray-600">A component from the svelte-component-library for displaying quoted text with special rendering effects.</p>
15
-
16
- <!-- QuoteDisplay Section -->
17
- <section class="mb-12">
18
- <h2 class="mb-4 text-2xl font-bold">Quote Display Demo</h2>
19
- <p class="mb-4 text-gray-600">The QuoteDisplay component renders text with special canvas-based effects:</p>
20
-
21
- <div class="mb-6 rounded-lg border border-gray-200 bg-gray-50 p-6 dark:border-gray-700 dark:bg-gray-900">
22
- {#if browser}
23
- <QuoteDisplay
24
- text="The only way to do great work is to love what you do. - Steve Jobs"
25
- style="width: 100%; height: 300px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);"
26
- />
27
- {:else}
28
- <div class="flex items-center justify-center h-96 bg-gradient-to-r from-purple-400 to-pink-500 rounded text-white text-lg">
29
- QuoteDisplay component (client-side only)
30
- </div>
31
- {/if}
32
- </div>
33
-
34
- <h3 class="mb-3 text-xl font-semibold">Props</h3>
35
- <table class="w-full border-collapse border border-gray-200 dark:border-gray-700">
36
- <thead>
37
- <tr class="bg-gray-100 dark:bg-gray-800">
38
- <th class="border border-gray-200 px-4 py-2 text-left dark:border-gray-700">Prop</th>
39
- <th class="border border-gray-200 px-4 py-2 text-left dark:border-gray-700">Type</th>
40
- <th class="border border-gray-200 px-4 py-2 text-left dark:border-gray-700">Description</th>
41
- </tr>
42
- </thead>
43
- <tbody>
44
- <tr>
45
- <td class="border border-gray-200 px-4 py-2 dark:border-gray-700"><code>text</code></td>
46
- <td class="border border-gray-200 px-4 py-2 dark:border-gray-700">string</td>
47
- <td class="border border-gray-200 px-4 py-2 dark:border-gray-700">The text to display in the quote</td>
48
- </tr>
49
- <tr class="bg-gray-50 dark:bg-gray-900">
50
- <td class="border border-gray-200 px-4 py-2 dark:border-gray-700"><code>style</code></td>
51
- <td class="border border-gray-200 px-4 py-2 dark:border-gray-700">string</td>
52
- <td class="border border-gray-200 px-4 py-2 dark:border-gray-700">CSS style string for the canvas element</td>
53
- </tr>
54
- </tbody>
55
- </table>
56
-
57
- <h3 class="mb-3 mt-6 text-xl font-semibold">Integration</h3>
58
- <p class="mb-4 text-gray-600">The QuoteDisplay component is now available through the library exports and can be imported from <code>$lib</code>:</p>
59
-
60
- <div class="rounded-lg border border-gray-200 bg-gray-50 p-4 dark:border-gray-700 dark:bg-gray-900">
61
- <pre><code>{`import { QuoteDisplay } from '$lib';
62
-
63
- <QuoteDisplay
64
- text="Your quote here"
65
- style="width: 100%; height: 300px;"
66
- />`}</code></pre>
67
- </div>
68
- </section>
69
-
70
- <nav class="mt-12 flex gap-4">
71
- <a href="/" class="text-blue-600 hover:underline dark:text-blue-400">← Back to Components</a>
72
- </nav>
73
- </main>
74
-
75
- <style>
76
- :global(body) {
77
- background-color: white;
78
- color: #333;
79
- }
80
-
81
- :global(.dark) :global(body) {
82
- background-color: #030712;
83
- color: #f3f4f6;
84
- }
85
-
86
- main {
87
- max-width: 56rem;
88
- margin: 0 auto;
89
- padding: 3rem 1.5rem;
90
- }
91
-
92
- h1 {
93
- margin-bottom: 0.5rem;
94
- font-size: 2.25rem;
95
- font-weight: 700;
96
- color: #111827;
97
- }
98
-
99
- :global(.dark) h1 {
100
- color: white;
101
- }
102
-
103
- h2 {
104
- margin-bottom: 1rem;
105
- font-size: 1.5rem;
106
- font-weight: 700;
107
- color: #111827;
108
- }
109
-
110
- :global(.dark) h2 {
111
- color: white;
112
- }
113
-
114
- h3 {
115
- margin-bottom: 0.75rem;
116
- font-size: 1.25rem;
117
- font-weight: 600;
118
- color: #111827;
119
- }
120
-
121
- :global(.dark) h3 {
122
- color: white;
123
- }
124
-
125
- code {
126
- background-color: #f3f4f6;
127
- padding: 0.125rem 0.375rem;
128
- border-radius: 0.25rem;
129
- font-family: 'Courier New', monospace;
130
- }
131
-
132
- :global(.dark) code {
133
- background-color: #374151;
134
- }
135
-
136
- pre {
137
- overflow-x: auto;
138
- padding: 1rem;
139
- font-size: 0.875rem;
140
- }
141
- </style>
package/static/robots.txt DELETED
@@ -1,3 +0,0 @@
1
- # allow crawling everything by default
2
- User-agent: *
3
- Disallow:
package/svelte.config.js DELETED
@@ -1,15 +0,0 @@
1
- import adapter from '@sveltejs/adapter-vercel';
2
-
3
- /** @type {import('@sveltejs/kit').Config} */
4
- const config = {
5
- kit: {
6
- adapter: adapter({
7
- runtime: 'nodejs22.x'
8
- }),
9
- prerender: {
10
- handleHttpError: 'warn'
11
- }
12
- }
13
- };
14
-
15
- export default config;
@@ -1,55 +0,0 @@
1
- import type { Config } from 'tailwindcss';
2
-
3
- export default {
4
- content: ['./src/**/*.{html,js,svelte,ts}'],
5
- theme: {
6
- extend: {
7
- colors: {
8
- // Claude Code aesthetic - professional, clean
9
- 'claude': {
10
- 'bg': '#FFFFFF',
11
- 'bg-secondary': '#F7F6F3',
12
- 'text': '#1A1A1A',
13
- 'text-secondary': '#565656',
14
- 'border': '#ECECEC',
15
- 'accent': '#0066CC',
16
- 'accent-hover': '#0052A3',
17
- },
18
- 'claude-dark': {
19
- 'bg': '#1A1A1A',
20
- 'bg-secondary': '#2D2D2D',
21
- 'text': '#FFFFFF',
22
- 'text-secondary': '#B0B0B0',
23
- 'border': '#3A3A3A',
24
- 'accent': '#4D94FF',
25
- 'accent-hover': '#6BA3FF',
26
- },
27
- },
28
- fontFamily: {
29
- 'sans': ['-apple-system', 'BlinkMacSystemFont', '"Segoe UI"', 'Roboto', '"Helvetica Neue"', 'Arial', 'sans-serif'],
30
- 'mono': ['"Fira Code"', '"Source Code Pro"', 'Menlo', 'monospace'],
31
- },
32
- typography: (theme: any) => ({
33
- DEFAULT: {
34
- css: {
35
- color: theme('colors.claude.text'),
36
- a: {
37
- color: theme('colors.claude.accent'),
38
- '&:hover': {
39
- color: theme('colors.claude.accent-hover'),
40
- },
41
- },
42
- code: {
43
- color: theme('colors.claude.accent'),
44
- backgroundColor: theme('colors.claude.bg-secondary'),
45
- padding: '0.25rem 0.5rem',
46
- borderRadius: '0.25rem',
47
- },
48
- },
49
- },
50
- }),
51
- },
52
- },
53
- plugins: [],
54
- darkMode: 'class', // Use class-based dark mode
55
- } satisfies Config;
@@ -1,40 +0,0 @@
1
- name: Build
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- - develop
8
- pull_request:
9
- branches:
10
- - main
11
- - develop
12
-
13
- jobs:
14
- build:
15
- runs-on: ubuntu-latest
16
-
17
- steps:
18
- - uses: actions/checkout@v3
19
-
20
- - name: Setup Node.js
21
- uses: actions/setup-node@v3
22
- with:
23
- node-version: '18'
24
- cache: 'npm'
25
-
26
- - name: Install dependencies
27
- run: npm install
28
-
29
- - name: Lint and type check
30
- run: npm run check
31
-
32
- - name: Build
33
- run: npm run build
34
-
35
- - name: Upload build artifacts
36
- uses: actions/upload-artifact@v3
37
- with:
38
- name: build
39
- path: build/
40
- retention-days: 1
@@ -1,47 +0,0 @@
1
- name: Deploy to GitHub Pages
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- workflow_dispatch:
8
-
9
- jobs:
10
- build_and_deploy:
11
- runs-on: ubuntu-latest
12
-
13
- permissions:
14
- contents: read
15
- pages: write
16
- id-token: write
17
-
18
- environment:
19
- name: github-pages
20
- url: ${{ steps.deployment.outputs.page_url }}
21
-
22
- steps:
23
- - uses: actions/checkout@v3
24
-
25
- - name: Setup Node.js
26
- uses: actions/setup-node@v3
27
- with:
28
- node-version: '18'
29
- cache: 'npm'
30
-
31
- - name: Setup Pages
32
- uses: actions/configure-pages@v3
33
-
34
- - name: Install dependencies
35
- run: npm install
36
-
37
- - name: Build
38
- run: npm run build
39
-
40
- - name: Upload artifact
41
- uses: actions/upload-pages-artifact@v2
42
- with:
43
- path: './build'
44
-
45
- - name: Deploy to GitHub Pages
46
- id: deployment
47
- uses: actions/deploy-pages@v2
@@ -1,41 +0,0 @@
1
- name: Deploy to Netlify
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- pull_request:
8
- branches:
9
- - main
10
-
11
- jobs:
12
- build_and_deploy:
13
- runs-on: ubuntu-latest
14
-
15
- steps:
16
- - uses: actions/checkout@v3
17
-
18
- - name: Setup Node.js
19
- uses: actions/setup-node@v3
20
- with:
21
- node-version: '18'
22
- cache: 'npm'
23
-
24
- - name: Install dependencies
25
- run: npm install
26
-
27
- - name: Build
28
- run: npm run build
29
-
30
- - name: Deploy to Netlify
31
- uses: nwtgck/actions-netlify@v2.0
32
- with:
33
- publish-dir: './build'
34
- production-branch: main
35
- deploy-message: 'Deploy from GitHub Actions'
36
- github-token: ${{ secrets.GITHUB_TOKEN }}
37
- netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
38
- netlify-site-id: ${{ secrets.NETLIFY_SITE_ID }}
39
- env:
40
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
@@ -1,64 +0,0 @@
1
- name: Deploy to Vercel
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- - staging
8
- pull_request:
9
- branches:
10
- - main
11
- - staging
12
-
13
- jobs:
14
- build_and_deploy:
15
- runs-on: ubuntu-latest
16
-
17
- steps:
18
- - uses: actions/checkout@v3
19
-
20
- - name: Setup Node.js
21
- uses: actions/setup-node@v3
22
- with:
23
- node-version: '18'
24
- cache: 'npm'
25
-
26
- - name: Install dependencies
27
- run: npm install
28
-
29
- - name: Build
30
- run: npm run build
31
-
32
- - name: Deploy to Vercel (Production)
33
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
34
- uses: amondnet/vercel-action@v25
35
- with:
36
- vercel-token: ${{ secrets.VERCEL_TOKEN }}
37
- vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
38
- vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
39
- vercel-args: '--prod'
40
-
41
- - name: Deploy to Vercel (Preview)
42
- if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref != 'refs/heads/main')
43
- uses: amondnet/vercel-action@v25
44
- with:
45
- vercel-token: ${{ secrets.VERCEL_TOKEN }}
46
- vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
47
- vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
48
-
49
- - name: Comment PR with Vercel URL
50
- if: github.event_name == 'pull_request'
51
- uses: actions/github-script@v6
52
- with:
53
- script: |
54
- const vercelUrl = process.env.VERCEL_URL || '';
55
- if (vercelUrl) {
56
- github.rest.issues.createComment({
57
- issue_number: context.issue.number,
58
- owner: context.repo.owner,
59
- repo: context.repo.repo,
60
- body: `🚀 [Preview](https://${vercelUrl}) deployed to Vercel!`
61
- });
62
- }
63
- env:
64
- VERCEL_URL: ${{ steps.deploy.outputs.preview_url }}
@@ -1,233 +0,0 @@
1
- # NPM Package Setup for Create Command
2
-
3
- This template is designed to be published as an npm package that supports the `npm create` command.
4
-
5
- ## Publishing as @andrew-org/create-docs-system
6
-
7
- ### Prerequisites
8
-
9
- - npm account with access to @andrew-org organization
10
- - Authenticated npm CLI (`npm login`)
11
-
12
- ### Package Configuration
13
-
14
- The `package.json` is pre-configured for:
15
-
16
- ```json
17
- {
18
- "name": "@andrew-org/create-docs-system",
19
- "version": "1.0.0",
20
- "type": "module",
21
- "bin": {
22
- "create-docs-system": "./bin/create.js"
23
- }
24
- }
25
- ```
26
-
27
- ### Create Setup Script
28
-
29
- Create `bin/create.js` for the setup process:
30
-
31
- ```javascript
32
- #!/usr/bin/env node
33
- import fs from 'fs';
34
- import path from 'path';
35
- import { fileURLToPath } from 'url';
36
-
37
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
38
- const sourceDir = path.join(__dirname, '..', 'template');
39
- const targetDir = process.argv[2] || 'my-docs';
40
-
41
- // Copy template files
42
- fs.cpSync(sourceDir, targetDir, { recursive: true });
43
-
44
- console.log(`✨ Documentation site created at ${targetDir}`);
45
- console.log('Next steps:');
46
- console.log(` cd ${targetDir}`);
47
- console.log(` npm install`);
48
- console.log(` npm run dev`);
49
- ```
50
-
51
- ### Steps to Publish
52
-
53
- 1. **Update package.json**
54
- ```json
55
- {
56
- "name": "@andrew-org/create-docs-system",
57
- "version": "1.0.0",
58
- "repository": {
59
- "type": "git",
60
- "url": "https://github.com/andrew-org/create-docs-system.git"
61
- },
62
- "publishConfig": {
63
- "access": "public"
64
- }
65
- }
66
- ```
67
-
68
- 2. **Create bin/create.js** (setup script above)
69
-
70
- 3. **Test locally**
71
- ```bash
72
- npm link
73
- npm create @andrew-org/docs-system@latest my-test-docs
74
- ```
75
-
76
- 4. **Publish to npm**
77
- ```bash
78
- npm publish
79
- ```
80
-
81
- ### Usage After Publishing
82
-
83
- Users can then create a new documentation site with:
84
-
85
- ```bash
86
- npm create @andrew-org/docs-system@latest my-docs
87
- cd my-docs
88
- npm install
89
- npm run dev
90
- ```
91
-
92
- Or with a custom name:
93
-
94
- ```bash
95
- npm create @andrew-org/docs-system@latest -- --name my-custom-docs
96
- ```
97
-
98
- ## Testing the Template Locally
99
-
100
- ### Option 1: Direct Copy
101
-
102
- ```bash
103
- cp -r template-starter my-docs
104
- cd my-docs
105
- npm install
106
- npm run build
107
- ```
108
-
109
- ### Option 2: npm link (Simulate Published Package)
110
-
111
- ```bash
112
- cd template-starter
113
- npm link
114
-
115
- # In another terminal, create from it
116
- npm create linked-package my-docs
117
- ```
118
-
119
- ### Option 3: Via npm create with Local Path
120
-
121
- ```bash
122
- npm create file:./template-starter my-docs
123
- ```
124
-
125
- ## Template Structure for Publishing
126
-
127
- Ensure the template root contains:
128
-
129
- ```
130
- template-starter/
131
- ├── bin/
132
- │ └── create.js # Setup script (when published)
133
- ├── docs/
134
- │ ├── index.md
135
- │ ├── setup.md
136
- │ ├── guides/
137
- │ ├── api/
138
- │ └── _config.json
139
- ├── src/
140
- │ ├── routes/
141
- │ ├── lib/
142
- │ ├── app.css
143
- │ ├── app.html
144
- │ └── app.d.ts
145
- ├── .github/workflows/
146
- │ ├── build.yml
147
- │ ├── deploy-github-pages.yml
148
- │ ├── deploy-netlify.yml
149
- │ └── deploy-vercel.yml
150
- ├── .gitignore
151
- ├── .npmrc
152
- ├── README.md
153
- ├── package.json
154
- ├── svelte.config.js
155
- ├── tailwind.config.ts
156
- ├── tsconfig.json
157
- ├── vite.config.ts
158
- ├── postcss.config.js
159
- └── pagefind.toml
160
- ```
161
-
162
- ## Updating the Package
163
-
164
- To release a new version:
165
-
166
- ```bash
167
- # Update version in package.json
168
- npm version minor # or major/patch
169
-
170
- # Publish
171
- npm publish
172
- ```
173
-
174
- ## Development Workflow
175
-
176
- 1. Make changes to template files
177
- 2. Test locally by copying template-starter to a test directory
178
- 3. Test build: `npm run build`
179
- 4. Test dev server: `npm run dev`
180
- 5. Update version and publish when ready
181
-
182
- ## Continuous Integration
183
-
184
- Configure GitHub Actions to:
185
- - Run tests on the template
186
- - Build and verify it works
187
- - Automatically publish on version tags
188
-
189
- Example workflow (`.github/workflows/publish.yml`):
190
-
191
- ```yaml
192
- name: Publish to npm
193
-
194
- on:
195
- push:
196
- tags:
197
- - 'v*'
198
-
199
- jobs:
200
- publish:
201
- runs-on: ubuntu-latest
202
- steps:
203
- - uses: actions/checkout@v3
204
- - uses: actions/setup-node@v3
205
- with:
206
- node-version: '18'
207
- registry-url: 'https://registry.npmjs.org'
208
- - run: npm install
209
- - run: npm publish --workspaces
210
- env:
211
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
212
- ```
213
-
214
- ## Migration from Old Starter Template
215
-
216
- When upgrading users from an old version:
217
-
218
- 1. Update CHANGELOG.md with breaking changes
219
- 2. Provide migration guide in docs
220
- 3. Maintain backwards compatibility where possible
221
- 4. Test upgrade path
222
-
223
- ## Support
224
-
225
- For issues with the template, users can:
226
- - Check documentation in `docs/`
227
- - Review GitHub issues
228
- - Submit pull requests
229
- - Contact @andrew-org organization
230
-
231
- ---
232
-
233
- **Ready for npm publishing!**