boilerforge 1.2.0-dev.1 → 1.2.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.
- package/LICENSE +21 -0
- package/README.md +107 -1
- package/dist/cli.js +34880 -33354
- package/dist/templates/create-node-app/app/README.md.hbs +54 -0
- package/dist/templates/{create-simple-app → create-node-app/app}/tsconfig.json.hbs +2 -1
- package/dist/templates/create-node-app/forge.config.json +14 -0
- package/dist/templates/create-node-app/forge.prompt.json +105 -0
- package/dist/templates/create-node-app/schema/prompt.schema.json +240 -0
- package/package.json +79 -66
- package/templates/create-simple-app/eslint.config.mjs.hbs +0 -23
- package/templates/create-simple-app/package.json.hbs +0 -30
- package/templates/create-simple-app/src/index.js.hbs +0 -5
- package/templates/create-simple-app/src/index.ts.hbs +0 -5
- package/templates/create-simple-app/tsconfig.json.hbs +0 -14
- /package/{templates/create-simple-app → dist/templates/create-node-app/app}/.editorconfig.hbs +0 -0
- /package/{templates/create-simple-app → dist/templates/create-node-app/app}/.gitignore.hbs +0 -0
- /package/{templates/create-simple-app → dist/templates/create-node-app/app}/.prettierignore.hbs +0 -0
- /package/{templates/create-simple-app → dist/templates/create-node-app/app}/.prettierrc.json.hbs +0 -0
- /package/dist/templates/{create-simple-app → create-node-app/app}/eslint.config.mjs.hbs +0 -0
- /package/dist/templates/{create-simple-app → create-node-app/app}/package.json.hbs +0 -0
- /package/dist/templates/{create-simple-app → create-node-app/app}/src/index.js.hbs +0 -0
- /package/dist/templates/{create-simple-app → create-node-app/app}/src/index.ts.hbs +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 tspyder7
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,109 @@
|
|
|
1
1
|
# boilerforge
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A blazing-fast CLI utility that scaffolds clean, ready-to-use project structures so you can skip the setup and start building instantly.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g boilerforge
|
|
9
|
+
# or
|
|
10
|
+
yarn global add boilerforge
|
|
11
|
+
# or
|
|
12
|
+
pnpm add -g boilerforge
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
boilerforge create <template> [options]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Commands
|
|
22
|
+
|
|
23
|
+
| Command | Description |
|
|
24
|
+
| ------------------------ | ---------------------------------- |
|
|
25
|
+
| `create <template>` | Create a project from a template |
|
|
26
|
+
| `list-templates` | List all available templates |
|
|
27
|
+
| `show-config <template>` | Show a template's configuration |
|
|
28
|
+
| `-v, --version` | Output the version number |
|
|
29
|
+
|
|
30
|
+
### Interactive Mode
|
|
31
|
+
|
|
32
|
+
Run `boilerforge create <template>` to launch an interactive prompt session:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
boilerforge create create-node-app
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
You'll be guided through a series of prompts to configure your project (e.g., project name, package manager, TypeScript, etc.).
|
|
39
|
+
|
|
40
|
+
### CLI Mode
|
|
41
|
+
|
|
42
|
+
For non-interactive environments, pass options via `--cli-config`:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
boilerforge create create-simple-app --cli-config "name=my-app;description=My app;version=1.0.0;author=me;packageManager=pnpm;isTypescript=true;isEslintPrettier=true"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The format is `key=value` pairs separated by `;`.
|
|
49
|
+
|
|
50
|
+
### Listing Templates
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
boilerforge list-templates
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Viewing Template Configuration
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
boilerforge show-config <template>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Available Templates
|
|
63
|
+
|
|
64
|
+
| Template | Description |
|
|
65
|
+
| ------------------- | ------------------------------------ |
|
|
66
|
+
| `create-node-app` | Scaffolds a Node.js project |
|
|
67
|
+
|
|
68
|
+
## Creating Custom Templates
|
|
69
|
+
|
|
70
|
+
See the [Creating Custom Templates](docs/creating-custom-templates.md) guide for detailed documentation on how to build and use your own templates.
|
|
71
|
+
|
|
72
|
+
## Template Structure
|
|
73
|
+
|
|
74
|
+
Templates live in the `templates/` directory and follow this structure:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
templates/<template-name>/
|
|
78
|
+
├── forge.config.json # Template metadata and file configuration
|
|
79
|
+
├── forge.prompt.json # Interactive prompts definition
|
|
80
|
+
├── schema/ # JSON schemas for validation
|
|
81
|
+
└── app/ # Template files (Handlebars)
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
- **forge.config.json** — Contains metadata (name, version) and conditional file rules using Jexl expressions (e.g., `"src/index.ts": "isTypescript == true"`).
|
|
85
|
+
- **forge.prompt.json** — Defines the interactive prompts (text, select, toggle) with validation rules.
|
|
86
|
+
- **app/** — Handlebars templates (`.hbs` files) that get compiled with user-provided values.
|
|
87
|
+
|
|
88
|
+
## Development
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Install dependencies
|
|
92
|
+
pnpm install
|
|
93
|
+
|
|
94
|
+
# Build
|
|
95
|
+
pnpm run build
|
|
96
|
+
|
|
97
|
+
# Run in dev mode
|
|
98
|
+
pnpm run dev -- create <template>
|
|
99
|
+
|
|
100
|
+
# Lint
|
|
101
|
+
pnpm run lint
|
|
102
|
+
|
|
103
|
+
# Format
|
|
104
|
+
pnpm run format
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## License
|
|
108
|
+
|
|
109
|
+
[MIT](LICENSE)
|