rebar-js 1.0.4 → 1.1.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/README.md +55 -150
- package/dist/index.js +6 -2
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,150 +1,55 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
##
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
bun add -g rebar-js
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Then run:
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
rebar-js init
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
<br>
|
|
66
|
-
|
|
67
|
-
## Usage
|
|
68
|
-
|
|
69
|
-
### Interactive mode
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
rebar-js init
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Walks you through:
|
|
76
|
-
|
|
77
|
-
1. **Package manager** — choose npm, yarn, or bun
|
|
78
|
-
2. **Framework** — pick Next.js, Vite, Express, Expo, or Electron
|
|
79
|
-
3. **Project name** — enter your project name
|
|
80
|
-
4. **Extra tooling** — select optional tools (varies by framework)
|
|
81
|
-
|
|
82
|
-
### Headless mode
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
rebar-js start -m npm -f vite
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Flags:
|
|
89
|
-
|
|
90
|
-
| Flag | Description |
|
|
91
|
-
|------|-------------|
|
|
92
|
-
| `-m, --packageManager <name>` | Package manager: `npm`, `yarn`, `bun` |
|
|
93
|
-
| `-f, --framework <name>` | Framework: `nextjs`, `vite`, `express`, `expo`, `electron` |
|
|
94
|
-
|
|
95
|
-
<br>
|
|
96
|
-
|
|
97
|
-
## Supported frameworks
|
|
98
|
-
|
|
99
|
-
| Framework | Prompts |
|
|
100
|
-
|-----------|---------|
|
|
101
|
-
| **Next.js** | React Compiler, shadcn/ui, tRPC, Drizzle ORM, Better Auth, Husky, ESLint / Biome |
|
|
102
|
-
| **Vite (React)** | TypeScript, Tailwind CSS, shadcn/ui, React Compiler, React Router, path aliasing |
|
|
103
|
-
| **Express** | TypeScript, Git, ESLint, path aliasing |
|
|
104
|
-
| **Expo** | Interactive `create-expo-app` (passthrough) |
|
|
105
|
-
| **Electron** | Electron Forge / Electron Vite (passthrough) |
|
|
106
|
-
|
|
107
|
-
<br>
|
|
108
|
-
|
|
109
|
-
## Requirements
|
|
110
|
-
|
|
111
|
-
- **Node.js** >= 20
|
|
112
|
-
- **npm**, **yarn**, or **bun** (depending on your preference)
|
|
113
|
-
- **Git** (for Express `git` option)
|
|
114
|
-
|
|
115
|
-
<br>
|
|
116
|
-
|
|
117
|
-
## Development
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
# Clone
|
|
121
|
-
git clone https://github.com/anomalyco/rebar-js.git
|
|
122
|
-
cd rebar-js
|
|
123
|
-
|
|
124
|
-
# Install dependencies
|
|
125
|
-
npm install
|
|
126
|
-
|
|
127
|
-
# Type-check
|
|
128
|
-
npm run typecheck
|
|
129
|
-
|
|
130
|
-
# Lint
|
|
131
|
-
npm run lint
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
Run the CLI locally:
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
node bin/project.js init
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
<br>
|
|
141
|
-
|
|
142
|
-
## Why "rebar-js"?
|
|
143
|
-
|
|
144
|
-
rebar-js is the steel reinforcing bar that gives concrete its tensile strength — it's hidden inside the structure, but everything relies on it. A solid scaffolding tool works the same way.
|
|
145
|
-
|
|
146
|
-
<br>
|
|
147
|
-
|
|
148
|
-
## License
|
|
149
|
-
|
|
150
|
-
ISC
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# rebar-js
|
|
4
|
+
|
|
5
|
+
Interactive scaffolding CLI for modern JS/TS projects.
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/rebar-js)
|
|
8
|
+
[](./LICENSE)
|
|
9
|
+
[](https://nodejs.org)
|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
Pick a framework, answer a few prompts, get a production-ready project — dependencies installed, tooling wired, ready to code.
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx rebar-js init
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Frameworks
|
|
22
|
+
|
|
23
|
+
| Framework | Tooling options |
|
|
24
|
+
|-----------|----------------|
|
|
25
|
+
| **Next.js** | shadcn/ui, tRPC, Drizzle ORM, Better Auth, React Compiler, ESLint / Biome, Husky |
|
|
26
|
+
| **Vite (React)** | TypeScript, Tailwind CSS, shadcn/ui, React Router, React Compiler, path aliasing |
|
|
27
|
+
| **Express** | TypeScript, ESLint, Git, path aliasing |
|
|
28
|
+
| **Expo** | passthrough via `create-expo-app` |
|
|
29
|
+
| **Electron** | Electron Forge or Electron Vite |
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
**Interactive**
|
|
34
|
+
```bash
|
|
35
|
+
npx rebar-js init
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Headless**
|
|
39
|
+
```bash
|
|
40
|
+
npx rebar-js start -m npm -f nextjs
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
| Flag | Values |
|
|
44
|
+
|------|--------|
|
|
45
|
+
| `-m, --packageManager` | `npm` · `yarn` · `bun` |
|
|
46
|
+
| `-f, --framework` | `nextjs` · `vite` · `express` · `expo` · `electron` |
|
|
47
|
+
|
|
48
|
+
## Requirements
|
|
49
|
+
|
|
50
|
+
- Node.js >= 20
|
|
51
|
+
- npm, yarn, or bun
|
|
52
|
+
|
|
53
|
+
## License
|
|
54
|
+
|
|
55
|
+
ISC
|
package/dist/index.js
CHANGED
|
@@ -1280,10 +1280,14 @@ var mapper = {
|
|
|
1280
1280
|
};
|
|
1281
1281
|
|
|
1282
1282
|
// src/index.ts
|
|
1283
|
+
import cfonts from "cfonts";
|
|
1283
1284
|
var program = new Command();
|
|
1284
|
-
program.name("Rebar").description("Interactive CLI for scaffolding JavaScript and TypeScript projects across multiple frameworks.").version("1.0
|
|
1285
|
+
program.name("Rebar").description("Interactive CLI for scaffolding JavaScript and TypeScript projects across multiple frameworks.").version("1.1.0");
|
|
1285
1286
|
program.command("init").description("choose a template to start").action(async () => {
|
|
1286
|
-
|
|
1287
|
+
cfonts.say("REBAR", {
|
|
1288
|
+
font: "block",
|
|
1289
|
+
colors: ["cyan"]
|
|
1290
|
+
});
|
|
1287
1291
|
info(`Let's scaffold your project! Answer a few questions to get started.
|
|
1288
1292
|
`);
|
|
1289
1293
|
const manager = await choosePackageManager();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rebar-js",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Interactive CLI for scaffolding JavaScript and TypeScript projects across multiple frameworks.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"rebar-js": "./bin/project.js"
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"type": "module",
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@inquirer/prompts": "^8.4.2",
|
|
38
|
+
"cfonts": "^3.3.1",
|
|
38
39
|
"commander": "^14.0.3"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
@@ -43,8 +44,8 @@
|
|
|
43
44
|
"eslint": "^10.3.0",
|
|
44
45
|
"globals": "^17.6.0",
|
|
45
46
|
"jiti": "^2.7.0",
|
|
46
|
-
"tsx": "^4.21.0",
|
|
47
47
|
"tsup": "^8.5.1",
|
|
48
|
+
"tsx": "^4.21.0",
|
|
48
49
|
"typescript": "^5.9.3",
|
|
49
50
|
"typescript-eslint": "^8.59.2"
|
|
50
51
|
},
|