@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 +6 -7
- package/bin/create-miniapp +19 -2
- package/package.json +1 -1
- package/template/build.ts +1 -1
- package/template/package.json +6 -5
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
|
|
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/
|
|
55
|
-
|
|
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,
|
|
61
|
-
|
|
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
|
|
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/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
|
|
28
|
+
* Output goes to ./dist with the shape `glassly release` expects.
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
import {rm} from "fs/promises"
|
package/template/package.json
CHANGED
|
@@ -2,19 +2,20 @@
|
|
|
2
2
|
"name": "{{packageName}}",
|
|
3
3
|
"private": true,
|
|
4
4
|
"scripts": {
|
|
5
|
-
"dev": "glassly
|
|
5
|
+
"dev": "glassly dev",
|
|
6
6
|
"build": "bun run build.ts",
|
|
7
7
|
"typecheck": "tsc --noEmit",
|
|
8
|
-
"release": "glassly
|
|
9
|
-
"pack": "glassly
|
|
8
|
+
"release": "glassly release",
|
|
9
|
+
"pack": "glassly pack"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@glassly/miniapp": "0.3.1-dev.
|
|
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/
|
|
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"
|