spring-starter 1.0.0 → 1.0.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 +91 -0
  2. package/package.json +8 -2
package/README.md ADDED
@@ -0,0 +1,91 @@
1
+ # Spring Starter
2
+
3
+ A CLI scaffolder for Spring Boot projects. Generate projects from [start.spring.io](https://start.spring.io) or download starter templates from GitHub repositories.
4
+
5
+ ## Features
6
+
7
+ - **Spring Initializr mode** – Generate a blank Spring Boot project via the official Spring Initializr API
8
+ - **GitHub Starter mode** – Download a Spring Boot starter template from any GitHub repository
9
+ - Interactive prompts for all configuration options
10
+ - Automatic ZIP extraction and cleanup
11
+
12
+ ## Installation
13
+
14
+ ### Via npm (recommended)
15
+
16
+ ```bash
17
+ npm install -g spring-starter
18
+ ```
19
+
20
+ ### From source
21
+
22
+ ```bash
23
+ git clone https://github.com/yourusername/spring-starter.git
24
+ cd spring-starter
25
+ npm install
26
+ npm run build
27
+ npm link
28
+ ```
29
+
30
+ ## Usage
31
+
32
+ Run the CLI:
33
+
34
+ ```bash
35
+ spring-starter
36
+ ```
37
+
38
+ Or with options:
39
+
40
+ ```bash
41
+ spring-starter --dir ~/projects --name my-app
42
+ ```
43
+
44
+ ### Options
45
+
46
+ | Option | Description | Default |
47
+ |-------------------|--------------------------------|------------------|
48
+ | `-d, --dir <path>` | Output directory | Current directory |
49
+ | `-n, --name <name>` | Project name | `demo` |
50
+ | `--starter` | Use GitHub Starter mode | — |
51
+ | `--default` | Use Spring Initializr mode | — |
52
+
53
+ ### Interactive prompts
54
+
55
+ 1. **Choose project type**: Spring Default (from start.spring.io) or Spring Starter (from GitHub)
56
+ 2. **Default mode**: Enter Group ID, Artifact ID, Spring Boot version, and Java version
57
+ 3. **Starter mode**: Enter the GitHub repo URL (e.g., `user/spring-boot-starter`) and project folder name
58
+
59
+ ## Project content
60
+
61
+ ```
62
+ src/
63
+ ├── index.ts # CLI entry point — Commander setup and interactive prompts
64
+ ├── spring-initializr.ts # Generates project from start.spring.io API
65
+ └── github.ts # Downloads and extracts starter from GitHub
66
+ ```
67
+
68
+ ### Dependencies
69
+
70
+ - [commander](https://github.com/tj/commander.js) – CLI framework
71
+ - [inquirer](https://github.com/SBoudrias/Inquirer.js) – Interactive prompts
72
+ - [axios](https://github.com/axios/axios) – HTTP client
73
+ - [extract-zip](https://github.com/maxogden/extract-zip) – ZIP extraction
74
+ - [ora](https://github.com/sindresorhus/ora) – Terminal spinners
75
+
76
+ ## Development
77
+
78
+ ```bash
79
+ # Run in development mode
80
+ npm run dev
81
+
82
+ # Build for production
83
+ npm run build
84
+
85
+ # Start the built version
86
+ npm start
87
+ ```
88
+
89
+ ## License
90
+
91
+ ISC
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spring-starter",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "CLI scaffolder untuk Spring Boot project dari start.spring.io atau GitHub",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -18,7 +18,13 @@
18
18
  "dev": "tsx src/index.ts",
19
19
  "prepublishOnly": "npm run build"
20
20
  },
21
- "keywords": ["spring-boot", "scaffolder", "cli", "spring", "initializr"],
21
+ "keywords": [
22
+ "spring-boot",
23
+ "scaffolder",
24
+ "cli",
25
+ "spring",
26
+ "initializr"
27
+ ],
22
28
  "author": "",
23
29
  "license": "ISC",
24
30
  "dependencies": {