spring-feature-cli 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.
Files changed (2) hide show
  1. package/README.md +63 -38
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,68 +1,93 @@
1
1
  # spring-feature-cli
2
2
 
3
- `spring-feature-cli` is a personal project to learn how to build command-line tools with Node.js. It is designed to generate basic Spring Boot artifacts using a feature-based structure and clean architecture principles.
3
+ `spring-feature-cli` is a Node.js CLI tool that generates Spring Boot feature-based boilerplate using templates.
4
+
5
+ It helps automate the creation of common backend layers such as entities, services, repositories, and controllers following a clean and consistent structure.
6
+
7
+ ---
4
8
 
5
9
  ## Purpose
6
10
 
7
- - Learn Node.js and the CLI ecosystem
8
- - Practice using `commander`, `inquirer`, and `handlebars`
9
- - Automate repetitive code generation for Spring Boot projects
10
- - Generate entities, services, repositories, and controllers with a simple workflow
11
+ This project was built to:
12
+
13
+ - Practice building real-world CLI tools with Node.js
14
+ - Learn `commander`, `inquirer`, and `handlebars`
15
+ - Automate repetitive Spring Boot boilerplate generation
16
+ - Apply feature-based architecture patterns
11
17
 
12
- ## Features
18
+ ---
13
19
 
14
- - Executable CLI via the `spfc` command
15
- - Template generation using `handlebars`
16
- - Input validation and project detection
17
- - Supports generating:
18
- - `Entity`
19
- - `Repository`
20
- - `Service`
21
- - `Controller`
20
+ ## ⚙️ Installation
22
21
 
23
- ## Installation
22
+ ### Global installation (recommended)
24
23
 
25
24
  ```bash
26
- npm install
25
+ npm install -g spring-feature-cli
27
26
  ```
28
27
 
29
- To install globally (optional):
30
-
28
+ ### Local usage (development)
31
29
  ```bash
32
- npm install -g .
30
+ npm install
31
+ npm run dev
33
32
  ```
34
33
 
35
34
  ## Usage
36
35
 
37
- Run the tool from the project directory:
36
+ ### Generate a Spring Boot feature:
38
37
 
39
38
  ```bash
40
- spfc generate
39
+ spfc generate User
41
40
  ```
42
41
 
43
- Or in development mode:
42
+ or
44
43
 
45
44
  ```bash
46
- npm run dev
45
+ spfc g User
47
46
  ```
47
+ This will generate a full structure for the feature (Entity, Repository, Service, Controller).
48
+
49
+ ### 🧱 Generated Structure
50
+
51
+ The CLI generates:
52
+
53
+ - Entity
54
+ - Repository
55
+ - Service
56
+ - Controller
57
+
58
+ All based on Handlebars templates and a consistent naming convention.
59
+
60
+ ## 📁 Project Structure
61
+
62
+ - `bin/index.js` → CLI entry point
63
+ - `src/index.js` → Main CLI logic
64
+ - `src/commands/` → Command definitions
65
+ - `src/actions/` → Generation logic
66
+ - `src/validations/` → Input validation layer
67
+ - `src/utils/` → Helpers (logging, scanning, template compilation, etc.)
68
+ - `src/templates/` → Handlebars templates for generated code
69
+
70
+ ---
71
+
72
+ ## 🧰 Key Dependencies
73
+
74
+ - `commander` → CLI command handling
75
+ - `inquirer` → Interactive prompts
76
+ - `handlebars` → Template engine
77
+ - `chalk` → Terminal styling
78
+
79
+ ---
80
+
81
+ ## ⚠️ Requirements
48
82
 
49
- ## Project Structure
83
+ - Node.js >= 16
50
84
 
51
- - `bin/index.js`: executable CLI entry point
52
- - `src/index.js`: main CLI logic
53
- - `src/commands/generate.js`: generate command
54
- - `src/actions/generateActions.js`: file creation actions
55
- - `src/validations/generateValidations.js`: input validations
56
- - `src/utils/`: utilities for Java package resolution, project scanning, and template compilation
57
- - `src/templates/`: Handlebars templates for generated artifacts
85
+ ---
58
86
 
59
- ## Key Dependencies
87
+ ## 💡 Notes
60
88
 
61
- - `commander` for defining CLI commands
62
- - `inquirer` for interactive prompts
63
- - `handlebars` for template generation
64
- - `chalk` for console styling
89
+ This tool assumes a Spring Boot project structure and is intended to be used inside a backend project where Java packages are detected automatically.
65
90
 
66
- ## License
91
+ 📄 License
67
92
 
68
- This project is licensed under `MIT`.
93
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spring-feature-cli",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "CLI para generar features de Spring Boot",
5
5
  "type": "module",
6
6
  "bin": {