rebar-js 1.0.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 ADDED
@@ -0,0 +1,150 @@
1
+ <p align="center">
2
+ <strong>Interactive project scaffolding for modern JavaScript & TypeScript frameworks.</strong>
3
+ </p>
4
+
5
+ <p align="center">
6
+ <a href="#features"><img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fanomalyco%2Frebar%2Fmain%2Fpackage.json&query=%24.version&style=flat&label=version&color=6c5ce7" alt="Version"></a>
7
+ <img src="https://img.shields.io/badge/license-ISC-6c5ce7?style=flat" alt="License">
8
+ <img src="https://img.shields.io/badge/node-%3E%3D20-6c5ce7?style=flat" alt="Node">
9
+ <img src="https://img.shields.io/badge/typescript-5.9-3178C6?style=flat" alt="TypeScript">
10
+ </p>
11
+
12
+ <br>
13
+
14
+ ## Overview
15
+
16
+ Rebar is an interactive CLI that scaffolds full-featured projects across **Next.js**, **Vite**, **Express**, **Expo**, and **Electron**. Answer a few prompts and get a production-ready project with your choice of package manager, linter, database ORM, auth, and UI toolkit — all wired up and ready to code.
17
+
18
+ <br>
19
+
20
+ ## Features
21
+
22
+ - **Framework selection** — Next.js, Vite (React), Express, Expo, or Electron
23
+ - **Package manager of choice** — npm, yarn, or bun
24
+ - **Per-framework tooling prompts** — TypeScript, Tailwind CSS, shadcn/ui, tRPC, Drizzle ORM, Better Auth, React Router, React Compiler, Husky, ESLint, Biome, path aliasing, and more
25
+ - **Interactive & headless modes** — `rebar init` for guided setup, `rebar start` for flag-driven automation
26
+ - **Colored terminal output** — step indicators, status symbols, and a welcome banner
27
+ - **Pinned dependency versions** — all packages are locked to stable releases so scaffolding doesn't break
28
+
29
+ <br>
30
+
31
+ ## Quick start
32
+
33
+ ```bash
34
+ npx rebar init
35
+ ```
36
+
37
+ Follow the prompts to pick a package manager, framework, and extra tooling. That's it.
38
+
39
+ <br>
40
+
41
+ ## Installation
42
+
43
+ ### Via npx (no install)
44
+
45
+ ```bash
46
+ npx rebar init
47
+ ```
48
+
49
+ ### Global install
50
+
51
+ ```bash
52
+ npm install -g rebar
53
+ # or
54
+ yarn global add rebar
55
+ # or
56
+ bun add -g rebar
57
+ ```
58
+
59
+ Then run:
60
+
61
+ ```bash
62
+ rebar init
63
+ ```
64
+
65
+ <br>
66
+
67
+ ## Usage
68
+
69
+ ### Interactive mode
70
+
71
+ ```bash
72
+ rebar 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 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.git
122
+ cd rebar
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"?
143
+
144
+ Rebar 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
package/bin/project.js ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { dirname, resolve } from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
5
+
6
+ const currentDir = dirname(fileURLToPath(import.meta.url));
7
+ const entryPath = resolve(currentDir, '../dist/index.js');
8
+
9
+ await import(entryPath);