boilerforge 1.1.3 → 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.
Files changed (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +106 -0
  3. package/dist/cli.js +35856 -21740
  4. package/{src/templates/create-node-app/resource/gitignore.ts → dist/templates/create-node-app/app/.gitignore.hbs} +1 -14
  5. package/dist/templates/create-node-app/app/.prettierrc.json.hbs +15 -0
  6. package/dist/templates/create-node-app/app/README.md.hbs +54 -0
  7. package/dist/templates/create-node-app/app/package.json.hbs +30 -0
  8. package/dist/templates/create-node-app/app/src/index.js.hbs +5 -0
  9. package/dist/templates/create-node-app/app/src/index.ts.hbs +5 -0
  10. package/dist/templates/create-node-app/app/tsconfig.json.hbs +15 -0
  11. package/dist/templates/create-node-app/forge.config.json +14 -0
  12. package/dist/templates/create-node-app/forge.prompt.json +105 -0
  13. package/dist/templates/create-node-app/schema/prompt.schema.json +240 -0
  14. package/package.json +17 -2
  15. package/.commitlintrc.json +0 -3
  16. package/.github/workflows/release-pipeline.yml +0 -79
  17. package/.husky/commit-msg +0 -4
  18. package/.husky/pre-push +0 -4
  19. package/.release/latest/config.json +0 -16
  20. package/.release/latest/manifest.json +0 -3
  21. package/.release/rc/config.json +0 -19
  22. package/.release/rc/manifest.json +0 -3
  23. package/CHANGELOG.md +0 -68
  24. package/bin/cli.ts +0 -21
  25. package/esbuild.config.ts +0 -17
  26. package/prettier.config.mjs +0 -20
  27. package/src/config/cli-config.ts +0 -25
  28. package/src/lib/file.ts +0 -159
  29. package/src/lib/project.ts +0 -211
  30. package/src/lib/prompter.ts +0 -201
  31. package/src/lib/task.ts +0 -41
  32. package/src/templates/create-node-app/index.ts +0 -306
  33. package/src/templates/create-node-app/resource/editor-config.ts +0 -24
  34. package/src/templates/create-node-app/resource/eslint.ts +0 -62
  35. package/src/templates/create-node-app/resource/package-json.ts +0 -57
  36. package/src/templates/create-node-app/resource/prettier.ts +0 -45
  37. package/src/templates/create-node-app/resource/project-deps.ts +0 -30
  38. package/src/templates/create-node-app/resource/project-files.ts +0 -17
  39. package/src/templates/create-node-app/resource/tsconfig.ts +0 -20
  40. package/src/templates/index.ts +0 -1
  41. package/src/templates/utils/badges.ts +0 -13
  42. package/src/templates/utils/git.ts +0 -64
  43. package/src/templates/utils/package-manager.ts +0 -78
  44. package/src/templates/utils/readme.ts +0 -115
  45. package/src/utils/exec-cmd.ts +0 -80
  46. package/src/utils/index.ts +0 -60
  47. package/src/utils/logger.ts +0 -24
  48. package/tsconfig.json +0 -17
  49. /package/{.editorconfig → dist/templates/create-node-app/app/.editorconfig.hbs} +0 -0
  50. /package/{.prettierignore → dist/templates/create-node-app/app/.prettierignore.hbs} +0 -0
  51. /package/{eslint.config.mjs → dist/templates/create-node-app/app/eslint.config.mjs.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)