create-specment 0.4.0 → 0.4.1

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/README.md +161 -116
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,15 +1,15 @@
1
1
  # create-specment
2
2
 
3
- [![NPM Package](.github/images/icons/npm-badge.svg)](https://www.npmjs.com/package/@plenarc/create-specment)
4
- [![MIT License](.github/images/icons/license-badge.svg)](LICENSE)
3
+ [![npm version][npm-image]][npm-url]
4
+ [![npm downlads][npm-downloads-image]][npm-url]
5
+ [![License][license-image]][license-url]
5
6
 
6
7
  [English](README.md) | [日本語](README-jp.md)
7
8
 
8
9
  Demo: https://plenarc.github.io/specment/
9
10
 
10
11
  1. 'specification' + 'document' => Specment
11
- 1. A site generation tool specializing in creating specification documents based on Docusaurus.
12
-
12
+ 1. A site generation tool specializing in creating specification documents based on Docusaurus
13
13
 
14
14
  <div align="center">
15
15
  <table>
@@ -40,7 +40,7 @@ Demo: https://plenarc.github.io/specment/
40
40
  ## Features
41
41
 
42
42
  1. 🚀 **Interactive Setup**: Generate projects by simply answering questions
43
- 1. 📋 **4 Specialized Templates**: Choose optimal templates based on your use case
43
+ 1. 📋 **5 Specialized Templates**: Choose optimal templates based on your use case
44
44
  1. 🔧 **Feature Selection**: Select PlantUML, Redoc, search, multilingual support, and more
45
45
  1. 📝 **Variable Substitution**: Automatically replace project names and author information
46
46
  1. 🎨 **Docusaurus Compatible**: Fully compatible with the existing Docusaurus ecosystem
@@ -61,15 +61,22 @@ The following software must be installed:
61
61
  ```
62
62
 
63
63
  1. **mise (development environment management tool)**
64
-
65
- ```bash
66
- # Install mise (Linux/macOS/WSL)
67
- curl https://mise.run | sh
68
-
69
- # Update shell configuration
70
- echo 'eval "$(mise activate bash)"' >> ~/.bashrc
71
- source ~/.bashrc
72
- ```
64
+ 1. Linux/macOS/WSL
65
+ ```bash
66
+ curl https://mise.run | sh
67
+
68
+ # Update shell configuration
69
+ echo 'eval "$(mise activate bash)"' >> ~/.bashrc
70
+ source ~/.bashrc
71
+ ```
72
+ 1. brew
73
+ ```bash
74
+ brew install mise
75
+ ```
76
+ 1. Version check
77
+ ```bash
78
+ mise --version
79
+ ```
73
80
 
74
81
  1. **Node.js (LTS or higher recommended, installation via mise recommended)**
75
82
 
@@ -94,143 +101,197 @@ The following software must be installed:
94
101
 
95
102
  ### Installation Methods
96
103
 
104
+ 1. For details on each option, see [Option Details](#option-details)
105
+
97
106
  #### Method 1: Using ni (Recommended)
98
107
 
99
108
  ```bash
100
- # Create project using ni
101
- nlx create-specment@latest my-docs
102
- cd my-docs
109
+ # Create project using ni (interactive setup will start)
110
+ nlx create-specment@latest
111
+ ```
103
112
 
104
- # Install dependencies using ni
105
- ni
113
+ After execution, the following options will be displayed, so select the necessary documents and features:
106
114
 
107
- # Start development server using ni
108
- nr start
115
+ ```bash
116
+ ◆ Please select display language / 表示言語を選択してください:
117
+ │ ● English
118
+ │ ○ 日本語
119
+
120
+
121
+ ┌ 🚀 Welcome to create-specment!
122
+ Creating a new Docusaurus-based specification documentation project...
123
+
124
+ ◆ Enter folder name (project name):
125
+ │ _
126
+
127
+
128
+ ◆ Which templates would you like to use? (Multiple selection)
129
+ │ ◻ Project Analysis
130
+ │ ◻ Requirements Specification
131
+ │ ◻ External Design
132
+ │ ◻ Internal Design
133
+ │ ◻ API (Using Redocusaurus)
134
+
135
+
136
+ ◆ Which additional features would you like to include?
137
+ │ ◻ PlantUML
138
+ │ ◻ Mermaid
139
+
109
140
  ```
110
141
 
111
- #### Method 2: Using npx
142
+ Once creation is complete, change to the folder and start in development mode after installation:
112
143
 
113
144
  ```bash
114
- # Create project using the latest version
115
- npx create-specment@latest my-docs
116
-
117
- # Specify a specific template
118
- npx create-specment@latest my-docs --template api-spec
145
+ cd <folder-name> && ni && nr start
119
146
  ```
120
147
 
121
- #### Method 3: Global Installation
148
+ #### Method 2: Using npx
122
149
 
123
150
  ```bash
124
- # Install globally
125
- npm install -g create-specment
126
-
127
- # Create project
128
- create-specment my-docs
151
+ # Start setup
152
+ npx create-specment@latest
129
153
  ```
130
154
 
131
- ### Basic Usage
155
+ 1. For option details, see Method 1
132
156
 
133
- 1. **Create Project**
157
+ ## Interactive Setup
134
158
 
135
- ```bash
136
- nlx create-specment@latest my-docs
137
- cd my-docs
138
- ```
159
+ When you run `create-specment`, the following options will be displayed sequentially:
139
160
 
140
- 1. **Interactive Setup**
161
+ ### 1. Display Language Selection
141
162
 
142
- Configure your project by answering the following questions:
163
+ ```
164
+ ◆ Please select display language / 表示言語を選択してください:
165
+ │ ● English
166
+ │ ○ 日本語
167
+ ```
143
168
 
144
- 1. **Language Selection**: Choose display language (English/Japanese)
145
- 1. **Project Name**: Name of your documentation site
146
- 1. **Template Selection**: Choose templates based on your use case (multiple selection)
147
- 1. **Feature Selection**: Select the features you need
169
+ 1. Select the display language for the interface
170
+ 1. Subsequent questions will be displayed in the selected language
148
171
 
149
- 1. **Start Development Server**
172
+ ### 2. Project Name Input
150
173
 
151
- ```bash
152
- # Install dependencies (if not automatically executed)
153
- ni
174
+ ```
175
+ Enter folder name (project name):
176
+ │ _
177
+ ```
154
178
 
155
- # Start development server
156
- nr start
157
- ```
179
+ 1. Enter the folder name for the project to be created
180
+ 1. This name will become the project directory name
158
181
 
159
- 1. **Build and Deploy**
182
+ ### 3. Template Selection (Multiple selection possible)
160
183
 
161
- ```bash
162
- # Production build
163
- nr build
184
+ ```
185
+ Which templates would you like to use? (Multiple selection)
186
+ ◻ Project Analysis (Provides structure for understanding project overview)
187
+ │ ◻ Requirements Specification
188
+ │ ◻ External Design
189
+ │ ◻ Internal Design
190
+ │ ◻ API (Using Redocusaurus)
191
+ ```
164
192
 
165
- # Local preview
166
- nr serve
167
- ```
193
+ 1. Multiple templates can be selected simultaneously
194
+ 1. Each template is generated as an independent section
195
+ 1. At least one template must be selected
168
196
 
169
- ## Template List
197
+ #### Project Analysis
170
198
 
171
- ### 1. Classic Specification (classic-spec)
172
- General-purpose specification template. Provides basic document structure.
199
+ Project overview and analysis template. Provides structure for understanding the overall picture of the project.
173
200
 
174
201
  **Use Cases**:
175
- 1. General technical specifications
176
- 1. Product specifications
177
- 1. Basic documentation creation
202
+ 1. Project proposals
203
+ 1. Current state analysis reports
204
+ 1. SWOT analysis documents
178
205
 
179
- ### 2. API Specification (api-spec)
180
- API specification template. Specialized for API documentation and OpenAPI specifications.
206
+ #### Requirements Specification
207
+ Requirements specification template. Allows systematic organization of functional and non-functional requirements.
181
208
 
182
209
  **Use Cases**:
183
- 1. REST API documentation
184
- 1. OpenAPI specifications
185
- 1. API reference guides
210
+ 1. System requirements specifications
211
+ 1. Functional specifications
212
+ 1. EARS format requirement descriptions
213
+
214
+ #### External Design
186
215
 
187
- ### 3. Technical Specification (technical-spec)
188
- Technical specification template. Focused on detailed technical documentation and system design.
216
+ External design specification template. Specialized for interface design with external systems.
189
217
 
190
218
  **Use Cases**:
191
- 1. System requirements documentation
192
- 1. Functional specifications
193
- 1. EARS format requirement descriptions
219
+ 1. System architecture design documents
220
+ 1. API design documents
221
+ 1. UI/UX design documents
222
+
223
+ #### Internal Design
194
224
 
195
- ### 4. Enterprise Specification (enterprise-spec)
196
- Enterprise specification template. Designed for large-scale enterprise documentation with comprehensive structure.
225
+ Internal design specification template. Specialized for detailed internal system design and algorithms.
197
226
 
198
227
  **Use Cases**:
199
- 1. Enterprise system architecture documentation
200
- 1. Comprehensive project documentation
201
- 1. Multi-stakeholder documentation
228
+ 1. Detailed design documents
229
+ 1. Database design documents
230
+ 1. Algorithm specifications
202
231
 
203
- ## Feature Selection
232
+ #### API
204
233
 
205
- ### PlantUML Integration
206
- Easily create UML diagrams and sequence diagrams.
234
+ 1. Using [Redocusaurus](https://github.com/rohit-gohri/redocusaurus), you can display YAML format files written in OpenAPI specifications
207
235
 
208
- ```plantuml
209
- @startuml
210
- Alice -> Bob: Hello
211
- Bob -> Alice: Hi!
212
- @enduml
236
+ ### 4. Additional Feature Selection
237
+
238
+ ```
239
+ Which additional features would you like to include?
240
+ │ ◻ PlantUML (PlantUML diagram integration (UML diagrams and flowcharts))
241
+ │ ◻ Mermaid
213
242
  ```
214
243
 
215
- ### Redoc Integration
216
- Beautifully display OpenAPI specifications.
244
+ 1. **PlantUML**: Adds functionality to create UML diagrams and flowcharts
245
+ 1. **Mermaid**: Adds functionality to create diagrams within Markdown
246
+ 1. Both can be selected
247
+
248
+ #### PlantUML
249
+
250
+ 1. You can use [PlantUML](https://plantuml.com/) for UML diagrams and sequence diagrams
251
+ 1. Uses the Docusaurus theme [create-specment](https://www.npmjs.com/package/create-specment)
252
+ 1. ※ Please refer to the README at the link for usage and precautions
253
+
254
+ #### Mermaid
255
+
256
+ 1. Uses the Docusaurus theme [theme-mermaid](https://docusaurus.io/docs/api/themes/@docusaurus/theme-mermaid)
217
257
 
218
- ### Multilingual Support
219
- Support for creating documentation in multiple languages.
258
+ #### Multilingual Support
259
+
260
+ TBD: Plans to support document creation in multiple languages (if requested)
220
261
 
221
262
  ## Command Line Options
222
263
 
223
264
  ```bash
224
265
  create-specment [project-name] [options]
225
266
 
267
+ Arguments:
268
+ project-name Folder name for the project to be created (optional)
269
+ When specified: Skip folder name input
270
+
226
271
  Options:
227
- --template <template> Template to use (classic-spec|api-spec|technical-spec|enterprise-spec)
272
+ -t, --template <template> Template to use (project-analysis|requirements|external-design|internal-design|api-spec)
228
273
  --skip-install Skip dependency installation
229
274
  --verbose Show detailed logs
230
275
  -h, --help Show help
231
276
  -V, --version Show version
232
277
  ```
233
278
 
279
+ ### Usage Examples
280
+
281
+ ```bash
282
+ # Complete interactive setup (all options will be displayed)
283
+ create-specment
284
+
285
+ # Specify folder name and interactive setup (skip folder name input)
286
+ create-specment my-docs
287
+
288
+ # Completely non-interactive (skip folder name and template selection)
289
+ create-specment my-docs --template requirements
290
+
291
+ # Specify template only (folder name input will be displayed)
292
+ create-specment --template api-spec
293
+ ```
294
+
234
295
  ## Troubleshooting
235
296
 
236
297
  ### Common Issues
@@ -293,28 +354,6 @@ nr start -- --port 3001
293
354
  1. The combination of mise + ni minimizes environment differences
294
355
  1. Running as a Linux environment within WSL provides an experience equivalent to macOS/Linux
295
356
 
296
- ## Development Environment Setup
297
-
298
- To participate in project development:
299
-
300
- ```bash
301
- # Clone repository
302
- git clone https://github.com/plenarc/create-specment.git
303
- cd create-specment
304
-
305
- # Install dependencies
306
- ni
307
-
308
- # Run in development mode
309
- nr dev
310
-
311
- # Run tests
312
- nr test
313
-
314
- # Build
315
- nr build
316
- ```
317
-
318
357
  ## License
319
358
 
320
359
  MIT License - See the [LICENSE](LICENSE) file for details.
@@ -329,10 +368,16 @@ We welcome contributions to the project! See [CONTRIBUTING.md](CONTRIBUTING.md)
329
368
  1. 💡 **Feature Requests**: [GitHub Discussions](https://github.com/plenarc/create-specment/discussions)
330
369
  1. 📖 **Documentation**: [Official Documentation](https://create-specment.dev)
331
370
 
332
- ## Related Projects
371
+ ## 関連プロジェクト
333
372
 
334
373
  1. [Docusaurus](https://docusaurus.io/) - Static site generator
335
374
  1. [mise](https://mise.jdx.dev/) - Development environment management tool
336
375
  1. [ni](https://github.com/antfu/ni) - Package manager unification tool
337
376
  1. [PlantUML](https://plantuml.com/) - UML diagram creation tool
338
377
  1. [Redoc](https://redocly.github.io/redoc/) - OpenAPI specification display tool
378
+
379
+ [npm-image]: https://img.shields.io/npm/v/create-specment.svg
380
+ [npm-url]: https://www.npmjs.com/package/create-specment
381
+ [npm-downloads-image]: https://img.shields.io/npm/dw/create-specment.svg
382
+ [license-image]: https://img.shields.io/github/license/plenarc/create-specment.svg
383
+ [license-url]: https://github.com/plenarc/create-specment/blob/main/LICENSE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-specment",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Interactive CLI tool for creating Docusaurus-based specification documentation projects",
5
5
  "type": "module",
6
6
  "author": "Plenarc",