create-rigg 0.1.0 → 0.1.2

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 CHANGED
@@ -2,18 +2,28 @@
2
2
 
3
3
  <p>
4
4
  <a href="https://npmx.dev/package/create-rigg"><img src="https://npmx.dev/api/registry/badge/version/create-rigg" alt="Version"></a>
5
- <a href="https://www.npmjs.com/package/create-rigg"><img src="https://img.shields.io/npm/v/create-rigg.svg" alt="Version"></a>
6
5
  </p>
7
6
 
8
7
  **Create Node.js projects with a modern toolchain**
9
8
 
10
9
  I really like what [VoidZero](https://voidzero.dev) and [Vite+](https://github.com/voidzero-dev/vite-plus) are doing for web development. **rigg** brings the same toolchain to every Node.js project outside the browser. Use it for backends, CLIs, libraries, scripts, whatever you're building.
11
10
 
11
+ ![Screenshot of the rigg CLI](./media/screenshot-cli.png)
12
+
12
13
  ## Create a new project with rigg
13
14
 
14
15
  ```bash
16
+ # pnpm
15
17
  pnpm create rigg@latest
18
+
19
+ # npm
16
20
  npm create rigg@latest
21
+
22
+ # bun
23
+ bun create rigg@latest
24
+
25
+ # yarn
26
+ yarn create rigg@latest
17
27
  ```
18
28
 
19
29
  ## What you get
@@ -44,6 +54,7 @@ Every generated project includes:
44
54
  ```bash
45
55
  pnpm dev # Run with tsx (no build step)
46
56
  pnpm build # Build with tsdown
57
+ pnpm start # Run compiled output
47
58
  pnpm test # Run Vitest
48
59
  pnpm check # Lint + format check + type check
49
60
  pnpm fmt # Format
package/dist/index.mjs CHANGED
@@ -243,6 +243,10 @@ async function scaffoldFiles(options, targetDir) {
243
243
  const pkg = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
244
244
  pkg.name = options.projectName;
245
245
  fs.writeFileSync(pkgJsonPath, JSON.stringify(pkg, null, 2) + "\n");
246
+ /** Replace the placeholder project name in README.md. */
247
+ const readmePath = path.join(targetDir, "README.md");
248
+ const readme = fs.readFileSync(readmePath, "utf-8");
249
+ fs.writeFileSync(readmePath, readme.replaceAll("{{project_name}}", options.projectName));
246
250
  /** Create the src directory and write the framework starter code. */
247
251
  fs.mkdirSync(path.join(targetDir, "src"), { recursive: true });
248
252
  fs.writeFileSync(path.join(targetDir, "src", "index.ts"), FRAMEWORK_INDEX[options.framework]);
@@ -285,6 +289,7 @@ async function installDependencies(options, targetDir) {
285
289
  }
286
290
  /** Prints the gradient intro. */
287
291
  function showIntro() {
292
+ console.log("");
288
293
  p.intro(pc.bold(gradient("rigg - Node.js projects with a modern toolchain", [[
289
294
  255,
290
295
  255,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rigg",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Create Node.js TypeScript projects using the Vite+ Toolchain - for everything outside the browser.",
5
5
  "keywords": [
6
6
  "backend",
@@ -65,6 +65,7 @@
65
65
  "fmt:check": "oxfmt --check",
66
66
  "check": "oxlint && oxfmt --check && tsc --noEmit",
67
67
  "dev": "tsx src/index.ts",
68
- "build": "tsdown src/index.ts"
68
+ "build": "tsdown src/index.ts",
69
+ "start": "node dist/index.mjs"
69
70
  }
70
71
  }
@@ -0,0 +1,17 @@
1
+ # {{project_name}}
2
+
3
+ > Short description of your project.
4
+
5
+ ## Commands
6
+
7
+ ```bash
8
+ pnpm dev # Run with tsx (no compile step)
9
+ pnpm build # Compile to dist/
10
+ pnpm start # Run compiled output
11
+ pnpm test # Vitest
12
+ pnpm check # Lint + format check + type check
13
+ ```
14
+
15
+ ---
16
+
17
+ Scaffolded with [rigg](https://github.com/ehs5/rigg).
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rigg-project",
3
3
  "version": "0.0.0",
4
- "description": "Create Node.js TypeScript projects with a Unified Toolchain",
4
+ "description": "",
5
5
  "keywords": [],
6
6
  "license": "",
7
7
  "author": "",
@@ -13,6 +13,7 @@
13
13
  "scripts": {
14
14
  "dev": "tsx src/index.ts",
15
15
  "build": "tsdown src/index.ts",
16
+ "start": "node dist/index.mjs",
16
17
  "test": "vitest",
17
18
  "lint": "oxlint",
18
19
  "lint:fix": "oxlint --fix",
@@ -1,5 +1,5 @@
1
- import { expect, test } from "vitest";
1
+ import { expect, test } from "vitest"
2
2
 
3
3
  test("example", () => {
4
- expect(true).toBe(true);
5
- });
4
+ expect(true).toBe(true)
5
+ })
@@ -1,7 +1,7 @@
1
- import { defineConfig } from "vitest/config";
1
+ import { defineConfig } from "vitest/config"
2
2
 
3
3
  export default defineConfig({
4
4
  test: {
5
5
  slowTestThreshold: 5_000,
6
6
  },
7
- });
7
+ })