@glassly/create-miniapp 0.1.0-dev.3 → 0.1.0-dev.5

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
@@ -47,19 +47,18 @@ bunx @glassly/create-miniapp my-app --type=display
47
47
  Use the `--flag=value` form for both flags; a space-separated `--type value` is
48
48
  not parsed.
49
49
  Requirements are only a starting point — edit `miniapp.json` directly, or with
50
- `glassly-miniapp hardware add`, as the miniapp grows.
50
+ `glassly hardware add`, as the miniapp grows.
51
51
 
52
52
  The generated project comes wired with
53
53
  [`@glassly/miniapp`](https://www.npmjs.com/package/@glassly/miniapp) (the SDK
54
- runtime) and [`@glassly/miniapp-cli`](https://www.npmjs.com/package/@glassly/miniapp-cli)
55
- (the `dev` / `build` / `pack` author flow), a `miniapp.json` manifest, and a
56
- TypeScript setup. Dependency pins are stamped at publish time to the exact
54
+ runtime) and [`@glassly/cli`](https://www.npmjs.com/package/@glassly/cli) (the
55
+ `glassly` command: `dev`, `release`, `pack`, `publish`), a `miniapp.json`
56
+ manifest, and a TypeScript setup. Dependency pins are stamped at publish time to the exact
57
57
  SDK versions this scaffolder shipped with, so a generated project installs
58
58
  on any release channel.
59
59
 
60
- To publish a finished miniapp to the Glassly Miniapp Store, see
61
- [`@glassly/cli`](https://www.npmjs.com/package/@glassly/cli), specifically `glassly login` and
62
- `glassly publish`.
60
+ To publish a finished miniapp to the Glassly Miniapp Store, run `glassly login`
61
+ once and then `glassly publish` from the project folder.
63
62
 
64
63
  ## Part of Glassly
65
64
 
@@ -1,3 +1,20 @@
1
- #!/usr/bin/env bun
1
+ #!/usr/bin/env node
2
2
  // Extensionless launcher: npm strips bin entries that point at .ts files.
3
- import "./index.ts"
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glassly/create-miniapp",
3
- "version": "0.1.0-dev.3",
3
+ "version": "0.1.0-dev.5",
4
4
  "description": "Scaffold a new Glassly miniapp project",
5
5
  "type": "module",
6
6
  "publishConfig": {
package/template/build.ts CHANGED
@@ -25,7 +25,7 @@
25
25
  * const tailwind = (await import("bun-plugin-tailwind")).default
26
26
  * uiBuild.plugins.push(tailwind)
27
27
  *
28
- * Output goes to ./dist with the shape `glassly-miniapp release` expects.
28
+ * Output goes to ./dist with the shape `glassly release` expects.
29
29
  */
30
30
 
31
31
  import {rm} from "fs/promises"
@@ -2,19 +2,20 @@
2
2
  "name": "{{packageName}}",
3
3
  "private": true,
4
4
  "scripts": {
5
- "dev": "glassly-miniapp dev",
5
+ "dev": "glassly dev",
6
6
  "build": "bun run build.ts",
7
7
  "typecheck": "tsc --noEmit",
8
- "release": "glassly-miniapp release",
9
- "pack": "glassly-miniapp pack"
8
+ "release": "glassly release",
9
+ "pack": "glassly pack"
10
10
  },
11
11
  "dependencies": {
12
- "@glassly/miniapp": "0.3.1-dev.509",
12
+ "@glassly/miniapp": "0.3.1-dev.525",
13
13
  "react": "^19.0.0",
14
14
  "react-dom": "^19.0.0"
15
15
  },
16
16
  "devDependencies": {
17
- "@glassly/miniapp-cli": "0.1.0-dev.1",
17
+ "@glassly/cli": "2.0.0-dev.3",
18
+ "@glassly/miniapp-cli": "0.1.0-dev.3",
18
19
  "@types/react": "^19.0.0",
19
20
  "@types/react-dom": "^19.0.0",
20
21
  "typescript": "^5.6.0"