create-specment 0.2.9 → 0.3.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 (133) hide show
  1. package/bin/commands/create.d.ts +0 -1
  2. package/bin/constants/languages.d.ts +0 -1
  3. package/bin/core/interactive-setup.d.ts +0 -1
  4. package/bin/core/interactive-setup.js +17 -10
  5. package/bin/core/interactive-setup.js.map +1 -1
  6. package/bin/core/interactive-setup.test.d.ts +0 -1
  7. package/bin/core/interactive-setup.test.js +7 -7
  8. package/bin/core/interactive-setup.test.js.map +1 -1
  9. package/bin/core/project-generator.d.ts +0 -1
  10. package/bin/core/project-generator.js +5 -8
  11. package/bin/core/project-generator.js.map +1 -1
  12. package/bin/features/index.d.ts +0 -1
  13. package/bin/features/index.js +15 -13
  14. package/bin/features/index.js.map +1 -1
  15. package/bin/generators/docusaurus-config.d.ts +0 -1
  16. package/bin/generators/docusaurus-config.js +211 -264
  17. package/bin/generators/docusaurus-config.js.map +1 -1
  18. package/bin/generators/package-json.d.ts +0 -1
  19. package/bin/generators/package-json.js +45 -91
  20. package/bin/generators/package-json.js.map +1 -1
  21. package/bin/generators/template-files.d.ts +0 -1
  22. package/bin/generators/template-files.js +563 -168
  23. package/bin/generators/template-files.js.map +1 -1
  24. package/bin/index.d.ts +0 -1
  25. package/bin/index.js.map +1 -1
  26. package/bin/templates/index.d.ts +0 -1
  27. package/bin/templates/index.js +36 -24
  28. package/bin/templates/index.js.map +1 -1
  29. package/bin/tests/integration.test.d.ts +0 -1
  30. package/bin/tests/integration.test.js +34 -34
  31. package/bin/tests/integration.test.js.map +1 -1
  32. package/bin/types/index.d.ts +1 -21
  33. package/bin/utils/config-merger.d.ts +0 -1
  34. package/bin/utils/config-merger.js +0 -1
  35. package/bin/utils/config-merger.js.map +1 -1
  36. package/bin/utils/errors.d.ts +0 -1
  37. package/bin/utils/install.d.ts +0 -1
  38. package/bin/utils/install.js +3 -3
  39. package/bin/utils/install.js.map +1 -1
  40. package/bin/utils/message-formatter.d.ts +0 -1
  41. package/bin/utils/template-processor.d.ts +0 -1
  42. package/bin/utils/template-processor.js +2 -3
  43. package/bin/utils/template-processor.js.map +1 -1
  44. package/bin/utils/template-processor.test.d.ts +0 -1
  45. package/bin/utils/template-processor.test.js +22 -22
  46. package/bin/utils/template-processor.test.js.map +1 -1
  47. package/bin/utils/version.d.ts +0 -1
  48. package/bin/utils/version.js +3 -3
  49. package/bin/utils/version.js.map +1 -1
  50. package/package.json +2 -7
  51. package/templates/docs/01-overview/_requirements-specification.mdx +1 -5
  52. package/templates/docs/01-overview/as-is.mdx +1 -1
  53. package/templates/docs/01-overview/glossary.mdx +6 -6
  54. package/templates/docs/01-overview/odsc.mdx +1 -1
  55. package/templates/docs/01-overview/to-be.mdx +6 -6
  56. package/templates/docs/02-requirements/functional/_req-template.mdx +0 -3
  57. package/templates/docs/02-requirements/functional/req-001.mdx +0 -4
  58. package/templates/docs/02-requirements/non-functional/_nfr-template.mdx +0 -3
  59. package/templates/docs/02-requirements/non-functional/nfr-001.mdx +0 -3
  60. package/templates/docs/02-requirements/non-functional/nfr-002.mdx +0 -3
  61. package/templates/docs/03-external/business-model.mdx +1 -1
  62. package/templates/docs/03-external/index.mdx +1 -1
  63. package/templates/docs/04-internal/batches/import-products.mdx +2 -6
  64. package/templates/docs/04-internal/policies/github.mdx +1 -1
  65. package/templates/docs/04-internal/rules/database.mdx +1 -1
  66. package/templates/docs/04-internal/screens/dashboard.mdx +1 -1
  67. package/templates/docs/04-internal/screens/index.mdx +1 -1
  68. package/templates/docs/04-internal/screens/login.mdx +1 -1
  69. package/templates/docs/04-internal/screens/menu.mdx +1 -1
  70. package/templates/docs/index.module.css +96 -0
  71. package/templates/docs/index.tsx +48 -0
  72. package/templates/docs/introduction/index.mdx +1 -1
  73. package/templates/docs/introduction/operational-policies/sharepoint.mdx +1 -1
  74. package/templates/package.json.template +46 -0
  75. package/templates/src/components/Highlight/index.tsx +68 -0
  76. package/templates/src/components/PriorityMatrix/index.tsx +97 -0
  77. package/templates/src/components/TBD/index.tsx +16 -0
  78. package/templates/src/css/custom.css +81 -0
  79. package/templates/src/types/requirements.ts +19 -0
  80. package/templates/static/img/business-model.drawio.svg +4 -0
  81. package/templates/static/img/gantt.drawio.svg +1152 -0
  82. package/templates/static/img/logo.svg +21 -0
  83. package/bin/commands/create.d.ts.map +0 -1
  84. package/bin/constants/languages.d.ts.map +0 -1
  85. package/bin/core/interactive-setup.d.ts.map +0 -1
  86. package/bin/core/interactive-setup.test.d.ts.map +0 -1
  87. package/bin/core/project-generator.d.ts.map +0 -1
  88. package/bin/features/index.d.ts.map +0 -1
  89. package/bin/generators/docusaurus-config.d.ts.map +0 -1
  90. package/bin/generators/package-json.d.ts.map +0 -1
  91. package/bin/generators/template-files.d.ts.map +0 -1
  92. package/bin/index.d.ts.map +0 -1
  93. package/bin/plugins/i18n-integration.d.ts +0 -25
  94. package/bin/plugins/i18n-integration.d.ts.map +0 -1
  95. package/bin/plugins/i18n-integration.js +0 -310
  96. package/bin/plugins/i18n-integration.js.map +0 -1
  97. package/bin/plugins/plantuml-integration.d.ts +0 -17
  98. package/bin/plugins/plantuml-integration.d.ts.map +0 -1
  99. package/bin/plugins/plantuml-integration.js +0 -112
  100. package/bin/plugins/plantuml-integration.js.map +0 -1
  101. package/bin/plugins/redoc-integration.d.ts +0 -25
  102. package/bin/plugins/redoc-integration.d.ts.map +0 -1
  103. package/bin/plugins/redoc-integration.js +0 -373
  104. package/bin/plugins/redoc-integration.js.map +0 -1
  105. package/bin/plugins/search-integration.d.ts +0 -20
  106. package/bin/plugins/search-integration.d.ts.map +0 -1
  107. package/bin/plugins/search-integration.js +0 -169
  108. package/bin/plugins/search-integration.js.map +0 -1
  109. package/bin/templates/index.d.ts.map +0 -1
  110. package/bin/templates/template-definitions.d.ts +0 -10
  111. package/bin/templates/template-definitions.d.ts.map +0 -1
  112. package/bin/templates/template-definitions.js +0 -517
  113. package/bin/templates/template-definitions.js.map +0 -1
  114. package/bin/tests/integration.test.d.ts.map +0 -1
  115. package/bin/types/index.d.ts.map +0 -1
  116. package/bin/utils/config-merger.d.ts.map +0 -1
  117. package/bin/utils/errors.d.ts.map +0 -1
  118. package/bin/utils/install.d.ts.map +0 -1
  119. package/bin/utils/message-formatter.d.ts.map +0 -1
  120. package/bin/utils/template-processor.d.ts.map +0 -1
  121. package/bin/utils/template-processor.test.d.ts.map +0 -1
  122. package/bin/utils/version.d.ts.map +0 -1
  123. package/templates/classic-spec/docusaurus.config.js.template +0 -106
  124. package/templates/classic-spec/package.json.template +0 -36
  125. package/templates/docs/example.drawio.svg +0 -57
  126. package/templates/external-design/docusaurus.config.js.template +0 -123
  127. package/templates/external-design/package.json.template +0 -36
  128. package/templates/internal-design/docusaurus.config.js.template +0 -123
  129. package/templates/internal-design/package.json.template +0 -36
  130. package/templates/project-analysis/docusaurus.config.js.template +0 -113
  131. package/templates/project-analysis/package.json.template +0 -36
  132. package/templates/requirements/docusaurus.config.js.template +0 -119
  133. package/templates/requirements/package.json.template +0 -36
@@ -1,285 +1,232 @@
1
- import { PlantUMLIntegration } from '../plugins/plantuml-integration.js';
2
- import { RedocIntegration } from '../plugins/redoc-integration.js';
3
- import { SearchIntegration } from '../plugins/search-integration.js';
4
- import { I18nIntegration } from '../plugins/i18n-integration.js';
5
- import { LANG } from '../constants/languages.js';
6
1
  export function generateDocusaurusConfig(selections) {
7
2
  const { projectName, templates, features } = selections;
8
3
  const enabledFeatures = features.filter((f) => f.enabled);
9
- // 複数テンプレートに応じた基本設定(最初のテンプレートをベースにする)
10
- const primaryTemplate = templates[0];
11
- const baseConfig = getBaseConfigForTemplate(primaryTemplate.name, projectName);
12
- // 機能に応じた設定を追加
13
- const config = applyFeatureConfigurations(baseConfig, enabledFeatures);
14
- // 設定の妥当性を検証
15
- validateConfig(config);
16
- return generateConfigString(config);
4
+ // 機能フラグ
5
+ const hasPlantUML = enabledFeatures.some(f => f.name === 'plantuml');
6
+ const hasMermaid = enabledFeatures.some(f => f.name === 'mermaid');
7
+ const hasRedoc = enabledFeatures.some(f => f.name === 'redoc');
8
+ return generateConfigString(templates, enabledFeatures, hasPlantUML, hasMermaid, hasRedoc, projectName);
17
9
  }
18
- function getBaseConfigForTemplate(templateName, projectName) {
19
- const baseConfig = {
20
- title: projectName,
21
- tagline: getTaglineForTemplate(templateName),
22
- favicon: 'img/favicon.ico',
23
- url: 'https://your-docusaurus-site.example.com',
24
- baseUrl: '/',
25
- organizationName: 'your-org',
26
- projectName: projectName,
27
- onBrokenLinks: 'throw',
28
- onBrokenMarkdownLinks: 'warn',
29
- i18n: {
30
- defaultLocale: LANG.EN.code,
31
- locales: [LANG.EN.code],
32
- },
33
- presets: [['classic', getPresetConfigForTemplate(templateName)]],
34
- themeConfig: getThemeConfigForTemplate(templateName, projectName),
35
- plugins: [],
36
- };
37
- return baseConfig;
38
- }
39
- function getTaglineForTemplate(templateName) {
40
- const taglines = {
41
- 'classic-spec': 'Classic Specification Documentation',
42
- 'api-spec': 'API Specification Documentation',
43
- 'technical-spec': 'Technical Specification Documentation',
44
- 'enterprise-spec': 'Enterprise Specification Documentation',
45
- };
46
- return taglines[templateName] || 'Documentation Site';
47
- }
48
- function getPresetConfigForTemplate(templateName) {
49
- const basePresetConfig = {
10
+ const makeI18n = () => {
11
+ return `
12
+ i18n: {
13
+ defaultLocale: 'ja',
14
+ locales: ['ja'],
15
+ },
16
+ `;
17
+ };
18
+ const makeMarkdown = (hasMermaid) => {
19
+ return hasMermaid ? `
20
+ markdown: {
21
+ mermaid: true,
22
+ },` : '';
23
+ };
24
+ const makePresets = (hasRedoc) => {
25
+ const baseText = {
26
+ classic: `[
27
+ 'classic',
28
+ {
50
29
  docs: {
51
- sidebarPath: './sidebars.js',
52
- editUrl: 'https://github.com/your-org/your-repo/tree/main/',
30
+ sidebarPath: './sidebars.ts',
53
31
  },
32
+ blog: false,
33
+ theme: {
34
+ customCss: './src/css/custom.css',
35
+ },
36
+ } satisfies Preset.Options,
37
+ ]`,
38
+ redoc: `[
39
+ 'redocusaurus',
40
+ {
41
+ specs: [
42
+ {
43
+ id: 'api-spec',
44
+ spec: 'openapi/openapi-single.yaml',
45
+ route: '/api/',
46
+ },
47
+ ],
54
48
  theme: {
55
- customCss: './src/css/custom.css',
49
+ primaryColor: '#1976d2',
56
50
  },
51
+ },
52
+ ]`,
57
53
  };
58
- // テンプレートに応じてブログ機能を調整
59
- if (templateName === 'classic-spec') {
60
- return {
61
- ...basePresetConfig,
62
- blog: {
63
- showReadingTime: true,
64
- editUrl: 'https://github.com/your-org/your-repo/tree/main/',
65
- },
66
- };
67
- }
68
- // 仕様書系テンプレートではブログを無効化
69
- return {
70
- ...basePresetConfig,
71
- blog: false,
54
+ return [
55
+ baseText.classic,
56
+ hasRedoc && baseText.redoc,
57
+ ].filter(Boolean).join(',\n ');
58
+ };
59
+ const makeThemes = (hasPlantUML, hasMermaid) => {
60
+ const baseText = {
61
+ search: `[
62
+ require.resolve('@easyops-cn/docusaurus-search-local'),
63
+ {
64
+ language: ['jp'],
65
+ hashed: true,
66
+ highlightSearchTermsOnTargetPage: true,
67
+ },
68
+ ]`,
69
+ plantUML: `require.resolve('docusaurus-theme-plantuml')`,
70
+ mermaid: `'@docusaurus/theme-mermaid'`,
72
71
  };
73
- }
74
- function getThemeConfigForTemplate(templateName, projectName) {
75
- const baseThemeConfig = {
76
- image: 'img/docusaurus-social-card.jpg',
77
- navbar: {
78
- title: projectName,
79
- logo: {
80
- alt: `${projectName} Logo`,
81
- src: 'img/logo.svg',
82
- },
83
- items: getNavbarItemsForTemplate(templateName),
84
- },
85
- footer: {
86
- style: 'dark',
87
- links: getFooterLinksForTemplate(templateName),
88
- copyright: `Copyright © ${new Date().getFullYear()} ${projectName}. Built with Docusaurus.`,
89
- },
90
- prism: {
91
- theme: 'prism-react-renderer/themes/github',
92
- darkTheme: 'prism-react-renderer/themes/dracula',
93
- },
72
+ return [
73
+ baseText.search,
74
+ hasPlantUML && baseText.plantUML,
75
+ hasMermaid && baseText.mermaid,
76
+ ].filter(Boolean).join(',\n ');
77
+ };
78
+ const makeNavbarItems = (templates, enabledFeatures) => {
79
+ const templateNavItems = {
80
+ 'project-analysis': { label: 'プロジェクト概要・分析', docId: 'overview/index' },
81
+ 'requirements': { label: '要件定義', docId: 'requirements/index' },
82
+ 'external-design': { label: '外部設計', docId: 'external/index' },
83
+ 'internal-design': { label: '内部設計', docId: 'internal/index' },
94
84
  };
95
- return baseThemeConfig;
96
- }
97
- function getNavbarItemsForTemplate(templateName) {
98
- const baseItems = [
85
+ let navbarItems = '[';
86
+ // 選択されたテンプレートに応じてナビゲーション項目を追加
87
+ for (const template of templates) {
88
+ const navItem = templateNavItems[template.name];
89
+ if (navItem) {
90
+ navbarItems += `
99
91
  {
100
- href: 'https://github.com/your-org/your-repo',
101
- label: 'GitHub',
102
- position: 'right',
103
- },
104
- ];
105
- switch (templateName) {
106
- case 'classic-spec':
107
- return [
108
- {
109
- type: 'docSidebar',
110
- sidebarId: 'tutorialSidebar',
111
- position: 'left',
112
- label: 'Documentation',
113
- },
114
- ...baseItems,
115
- ];
116
- case 'api-spec':
117
- return [
118
- {
119
- type: 'docSidebar',
120
- sidebarId: 'apiSidebar',
121
- position: 'left',
122
- label: 'API Reference',
123
- },
124
- {
125
- type: 'docSidebar',
126
- sidebarId: 'guidesSidebar',
127
- position: 'left',
128
- label: 'Guides',
129
- },
130
- ...baseItems,
131
- ];
132
- case 'technical-spec':
133
- return [
134
- {
135
- type: 'docSidebar',
136
- sidebarId: 'architectureSidebar',
137
- position: 'left',
138
- label: 'Architecture',
139
- },
140
- {
141
- type: 'docSidebar',
142
- sidebarId: 'implementationSidebar',
143
- position: 'left',
144
- label: 'Implementation',
145
- },
146
- ...baseItems,
147
- ];
148
- case 'enterprise-spec':
149
- return [
150
- {
151
- type: 'docSidebar',
152
- sidebarId: 'overviewSidebar',
153
- position: 'left',
154
- label: 'Overview',
155
- },
156
- {
157
- type: 'docSidebar',
158
- sidebarId: 'specificationSidebar',
159
- position: 'left',
160
- label: 'Specifications',
161
- },
162
- {
163
- type: 'docSidebar',
164
- sidebarId: 'processSidebar',
165
- position: 'left',
166
- label: 'Processes',
167
- },
168
- ...baseItems,
169
- ];
170
- default:
171
- return [
172
- {
173
- type: 'docSidebar',
174
- sidebarId: 'tutorialSidebar',
175
- position: 'left',
176
- label: 'Documentation',
177
- },
178
- ...baseItems,
179
- ];
92
+ label: '${navItem.label}',
93
+ type: 'doc',
94
+ position: 'left',
95
+ docId: '${navItem.docId}',
96
+ },`;
97
+ }
180
98
  }
181
- }
182
- function getFooterLinksForTemplate(_templateName) {
183
- const baseLinks = [
99
+ // redoc機能が有効な場合はAPIリンクを追加
100
+ const hasRedocFeature = enabledFeatures.some(f => f.name === 'redoc');
101
+ if (hasRedocFeature) {
102
+ navbarItems += `
184
103
  {
185
- title: 'Community',
186
- items: [
187
- {
188
- label: 'GitHub',
189
- href: 'https://github.com/your-org/your-repo',
190
- },
191
- ],
104
+ label: 'API',
105
+ position: 'left',
106
+ to: '/api/',
107
+ },`;
108
+ }
109
+ // GitHubリンクを追加
110
+ navbarItems += `
111
+ {
112
+ href: isGithubActions ? \`https://github.com/\${organizationValue}/\${projectValue}\` : 'http://localhost:3000',
113
+ label: 'GitHub',
114
+ position: 'right',
192
115
  },
193
- ];
194
- const docLinks = {
195
- title: 'Documentation',
196
- items: [
116
+ ]`;
117
+ return navbarItems;
118
+ };
119
+ function generateConfigString(templates, enabledFeatures, hasPlantUML, hasMermaid, hasRedoc, projectName) {
120
+ const i18n = makeI18n();
121
+ const markdown = makeMarkdown(hasMermaid);
122
+ const presets = makePresets(hasRedoc);
123
+ const themes = makeThemes(hasPlantUML, hasMermaid);
124
+ // 選択されたテンプレートに応じてナビゲーション項目を動的に生成
125
+ const navbarItems = makeNavbarItems(templates, enabledFeatures);
126
+ // TypeScript形式で設定を生成
127
+ return `import type * as Preset from '@docusaurus/preset-classic';
128
+ import type { Config } from '@docusaurus/types';
129
+ import { themes as prismThemes } from 'prism-react-renderer';
130
+
131
+ // GitHub pages deployment config.
132
+ // ToDo: 最初に編集する必要がある箇所
133
+ const titleValue = 'プロジェクト名';
134
+ const descriptionValue = 'プロジェクト概要。xxxのためのシステムです';
135
+ const organizationValue = 'your-org';
136
+ const projectValue = '${projectName}';
137
+ const urlValue = \`https://\${organizationValue}.github.io\`;
138
+ const baseUrlValue = \`/\${projectValue}/\`;
139
+
140
+ // ToDo: Since I don't think GitHub Pages will be used in actual operation, this area needs to be edited according to the environment.
141
+ // ToDo: 実運用時にGitHub Pagesは使わないと思うので、この辺りは環境に合わせて要編集する
142
+ const isGithubActions = process.env.GITHUB_ACTIONS === 'true';
143
+
144
+ const config: Config = {
145
+ title: titleValue,
146
+ tagline: descriptionValue,
147
+ favicon: 'img/favicon.ico',
148
+
149
+ url: isGithubActions ? urlValue : 'http://localhost:3000',
150
+ baseUrl: isGithubActions ? baseUrlValue : '/',
151
+
152
+ organizationName: organizationValue,
153
+ projectName: projectValue,
154
+ trailingSlash: false,
155
+
156
+ onBrokenLinks: 'warn',
157
+ onBrokenMarkdownLinks: 'warn',
158
+
159
+ ${i18n}
160
+
161
+ ${markdown}
162
+
163
+ presets: [
164
+ ${presets}
165
+ ],
166
+
167
+ themeConfig: {
168
+ image: 'img/docusaurus-social-card.jpg',
169
+ docs: {
170
+ sidebar: {
171
+ hideable: true,
172
+ autoCollapseCategories: true,
173
+ },
174
+ },
175
+ navbar: {
176
+ title: titleValue,
177
+ logo: {
178
+ alt: titleValue,
179
+ src: 'img/logo.svg',
180
+ },
181
+ items: ${navbarItems}
182
+ },
183
+ footer: {
184
+ style: 'dark',
185
+ links: [
186
+ {
187
+ title: 'Community',
188
+ items: [
197
189
  {
198
- label: 'Getting Started',
199
- to: '/docs/intro',
190
+ label: 'Slack (Sample)',
191
+ href: 'https://slack.com/intl/ja-jp',
200
192
  },
201
- ],
202
- };
203
- return [docLinks, ...baseLinks];
204
- }
205
- function applyFeatureConfigurations(config, enabledFeatures) {
206
- // Add feature-specific configurations using dedicated integration classes
207
- for (const feature of enabledFeatures) {
208
- let featureConfig = {};
209
- switch (feature.name) {
210
- case 'plantuml':
211
- featureConfig = PlantUMLIntegration.generateDocusaurusConfig(feature);
212
- break;
213
- case 'redoc':
214
- featureConfig = RedocIntegration.generateDocusaurusConfig(feature);
215
- break;
216
- case 'search':
217
- featureConfig = SearchIntegration.generateDocusaurusConfig(feature);
218
- break;
219
- case 'i18n':
220
- featureConfig = I18nIntegration.generateDocusaurusConfig(feature);
221
- break;
222
- }
223
- // Merge feature configuration into main config
224
- if (featureConfig.themeConfig) {
225
- config.themeConfig = mergeDeep(config.themeConfig, featureConfig.themeConfig);
226
- }
227
- if (featureConfig.plugins) {
228
- config.plugins.push(...featureConfig.plugins);
229
- }
230
- if (featureConfig.i18n) {
231
- config.i18n = { ...config.i18n, ...featureConfig.i18n };
232
- }
233
- if (featureConfig.presets) {
234
- config.presets.push(...featureConfig.presets);
235
- }
236
- }
237
- return config;
238
- }
239
- function validateConfig(config) {
240
- // 必須フィールドの検証
241
- const requiredFields = ['title', 'url', 'baseUrl', 'presets', 'themeConfig'];
242
- for (const field of requiredFields) {
243
- if (!config[field]) {
244
- throw new Error(`Required configuration field missing: ${field}`);
245
- }
246
- }
247
- // URL形式の検証
248
- try {
249
- new URL(config.url);
250
- }
251
- catch (_error) {
252
- throw new Error(`Invalid URL format: ${config.url}`);
253
- }
254
- // プリセット設定の検証
255
- if (!Array.isArray(config.presets) || config.presets.length === 0) {
256
- throw new Error('At least one preset must be configured');
257
- }
258
- }
259
- function generateConfigString(config) {
260
- // Prismテーマの設定を特別に処理
261
- let configString = JSON.stringify(config, null, 2);
262
- // Prismテーマの文字列をrequire文に置換
263
- configString = configString.replace('"prism-react-renderer/themes/github"', 'require("prism-react-renderer").themes.github');
264
- configString = configString.replace('"prism-react-renderer/themes/dracula"', 'require("prism-react-renderer").themes.dracula');
265
- return `// @ts-check
266
- // Note: type annotations allow type checking and IDEs autocompletion
193
+ {
194
+ label: 'GitHub Discussions',
195
+ href: 'https://github.com/plenarc/create-specment/discussions',
196
+ },
197
+ ],
198
+ },
199
+ {
200
+ title: 'More',
201
+ items: [
202
+ {
203
+ label: 'Changelog',
204
+ href: 'https://github.com/plenarc/create-specment/blob/main/CHANGELOG.md',
205
+ },
206
+ {
207
+ label: 'GitHub: Create Specment',
208
+ href: 'https://github.com/plenarc/create-specment',
209
+ },
210
+ {
211
+ label: 'Docusaurus',
212
+ href: 'https://docusaurus.io/',
213
+ },
214
+ ],
215
+ },
216
+ ],
217
+ copyright: \`Copyright © \${new Date().getFullYear()} \${titleValue}, Inc. Built with Specment.\`,
218
+ },
219
+ prism: {
220
+ theme: prismThemes.github,
221
+ darkTheme: prismThemes.dracula,
222
+ },
223
+ } satisfies Preset.ThemeConfig,
267
224
 
268
- /** @type {import('@docusaurus/types').Config} */
269
- const config = ${configString};
225
+ themes: [
226
+ ${themes}
227
+ ],
228
+ };
270
229
 
271
- module.exports = config;`;
272
- }
273
- function mergeDeep(target, source) {
274
- const result = { ...target };
275
- for (const key in source) {
276
- if (source[key] && typeof source[key] === 'object' && !Array.isArray(source[key])) {
277
- result[key] = mergeDeep(result[key] || {}, source[key]);
278
- }
279
- else {
280
- result[key] = source[key];
281
- }
282
- }
283
- return result;
230
+ export default config;`;
284
231
  }
285
232
  //# sourceMappingURL=docusaurus-config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"docusaurus-config.js","sourceRoot":"","sources":["../../src/generators/docusaurus-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAEjD,MAAM,UAAU,wBAAwB,CAA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CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC;IACtE,IAAI,eAAe,EAAE,CAAC;QACpB,WAAW,IAAI;;;;;WAKR,CAAC;IACV,CAAC;IAED,eAAe;IACf,WAAW,IAAI;;;;;;QAMT,CAAC;IAEP,OAAO,WAAW,CAAC;AACrB,CAAC,CAAA;AAED,SAAS,oBAAoB,CAAC,SAAgB,EAAE,eAAsB,EAAE,WAAoB,EAAE,UAAmB,EAAE,QAAiB,EAAE,WAAmB;IACvJ,MAAM,IAAI,GAAG,QAAQ,EAAE,CAAC;IACxB,MAAM,QAAQ,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;IAC1C,MAAM,OAAO,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IACtC,MAAM,MAAM,GAAG,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IAEnD,iCAAiC;IACjC,MAAM,WAAW,GAAG,eAAe,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;IAEhE,qBAAqB;IACrB,OAAO;;;;;;;;;wBASe,WAAW;;;;;;;;;;;;;;;;;;;;;;;IAuB/B,IAAI;;IAEJ,QAAQ;;;MAGN,OAAO;;;;;;;;;;;;;;;;;eAiBE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6CpB,MAAM;;;;uBAIW,CAAC;AACxB,CAAC"}
@@ -1,3 +1,2 @@
1
1
  import type { UserSelections } from '../types/index.js';
2
2
  export declare function generatePackageJson(selections: UserSelections): any;
3
- //# sourceMappingURL=package-json.d.ts.map