create-solidrt 0.0.13

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,13 @@
1
+ # create-solidrt
2
+
3
+ Scaffold a new [SolidRT](https://github.com/antoinevanwel/solidrt) project:
4
+
5
+ ```sh
6
+ bun create solidrt my-app
7
+ cd my-app
8
+ bunx srt run src/index.tsx
9
+ ```
10
+
11
+ This forwards to `srt init` from `@solidrt/cli`, which writes a starter project
12
+ (package.json, tsconfig.json, AGENTS.md, src/index.tsx) into a new, empty folder
13
+ and installs the dependencies.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env bun
2
+ import "../src/main"
package/package.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "create-solidrt",
3
+ "version": "0.0.13",
4
+ "license": "MIT",
5
+ "author": "Antoine van Wel",
6
+ "type": "module",
7
+ "bin": {
8
+ "create-solidrt": "./bin/create-solidrt"
9
+ },
10
+ "files": [
11
+ "bin/",
12
+ "src/",
13
+ "README.md"
14
+ ]
15
+ }
package/src/main.ts ADDED
@@ -0,0 +1,18 @@
1
+ // `bun create solidrt <dir>` entry point. A thin wrapper that forwards to
2
+ // `srt init` in @solidrt/cli, so there is one source of truth for what a new
3
+ // SolidRT project looks like. We shell out via `bun x` rather than depend on
4
+ // @solidrt/cli directly, to avoid pulling its native-binary tree into the
5
+ // scaffolder. The empty/existing-folder guard lives in `srt init`.
6
+
7
+ let dir = process.argv[2]
8
+ if (!dir || dir.startsWith("-")) {
9
+ console.error("Usage: bun create solidrt <dir>")
10
+ process.exit(1)
11
+ }
12
+
13
+ let proc = Bun.spawnSync(["bun", "x", "@solidrt/cli", "init", dir], {
14
+ stdin: "inherit",
15
+ stdout: "inherit",
16
+ stderr: "inherit",
17
+ })
18
+ process.exit(proc.exitCode ?? 0)