@glassly/create-miniapp 0.1.0-dev.4 → 0.1.0-dev.6
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/bin/create-miniapp +19 -2
- package/package.json +1 -1
- package/template/package.json +3 -3
package/bin/create-miniapp
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
// Extensionless launcher: npm strips bin entries that point at .ts files.
|
|
3
|
-
|
|
3
|
+
// The scaffolder runs under Bun; when invoked from Node (npx, npm create)
|
|
4
|
+
// delegate to Bun if it is installed, otherwise say how to get it.
|
|
5
|
+
import {spawnSync} from "node:child_process"
|
|
6
|
+
import {fileURLToPath} from "node:url"
|
|
7
|
+
|
|
8
|
+
const entry = fileURLToPath(new URL("./index.ts", import.meta.url))
|
|
9
|
+
|
|
10
|
+
if (process.versions.bun) {
|
|
11
|
+
await import(entry)
|
|
12
|
+
} else {
|
|
13
|
+
const result = spawnSync("bun", [entry, ...process.argv.slice(2)], {stdio: "inherit"})
|
|
14
|
+
if (result.error && result.error.code === "ENOENT") {
|
|
15
|
+
console.error("create-miniapp runs on Bun, which is not installed or not on PATH.")
|
|
16
|
+
console.error("Install it from https://bun.sh, then run: bunx @glassly/create-miniapp my-miniapp")
|
|
17
|
+
process.exit(1)
|
|
18
|
+
}
|
|
19
|
+
process.exit(result.status ?? 1)
|
|
20
|
+
}
|
package/package.json
CHANGED
package/template/package.json
CHANGED
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"pack": "glassly pack"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@glassly/miniapp": "0.3.1-dev.
|
|
12
|
+
"@glassly/miniapp": "0.3.1-dev.528",
|
|
13
13
|
"react": "^19.0.0",
|
|
14
14
|
"react-dom": "^19.0.0"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@glassly/cli": "2.0.0-dev.
|
|
18
|
-
"@glassly/miniapp-cli": "0.1.0-dev.
|
|
17
|
+
"@glassly/cli": "2.0.0-dev.3",
|
|
18
|
+
"@glassly/miniapp-cli": "0.1.0-dev.4",
|
|
19
19
|
"@types/react": "^19.0.0",
|
|
20
20
|
"@types/react-dom": "^19.0.0",
|
|
21
21
|
"typescript": "^5.6.0"
|