@blastlauncher/cli 1.0.3 → 1.0.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/CHANGELOG.md +12 -0
- package/README.md +30 -1
- package/dist/index.cjs +5 -1
- package/index.js +9 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@blastlauncher/cli`
|
|
2
|
+
|
|
3
|
+
`@blastlauncher/cli` is a command line tool that used to build and publish Blast Launcher extensions.
|
|
4
|
+
|
|
5
|
+
I somehow discover that Raycast's extension build output are similar to esbuild's output, so I also use esbuild to bundle the extension and pkg to package the cli executable. Ray's CLI is way smaller, I guess their CLI is written in Go. 🤣
|
|
6
|
+
|
|
7
|
+
The publish command will upload the extension to npm registry(which is released under `@blast-extensions` for now).
|
|
2
8
|
|
|
3
9
|
## Development
|
|
4
10
|
|
|
@@ -14,6 +20,29 @@ pnpm package
|
|
|
14
20
|
|
|
15
21
|
# Run the cli executable
|
|
16
22
|
./dist/cli-macos --help
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
### npm
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install -g @blastlauncher/cli
|
|
31
|
+
```
|
|
17
32
|
|
|
33
|
+
## Help
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
Usage: blast [options] [command]
|
|
18
37
|
|
|
38
|
+
CLI for Blast Launcher
|
|
39
|
+
|
|
40
|
+
Options:
|
|
41
|
+
-h, --help display help for command
|
|
42
|
+
|
|
43
|
+
Commands:
|
|
44
|
+
publish [options] <path> <organization> Publish extensions
|
|
45
|
+
build [options] <path> Build extensions
|
|
46
|
+
help [command] display help for command
|
|
19
47
|
```
|
|
48
|
+
|
package/dist/index.cjs
CHANGED
|
@@ -347,10 +347,14 @@ function updatePackageInfo(targetDir, version, npmOrganization) {
|
|
|
347
347
|
}
|
|
348
348
|
packageJson.repository = "https://github.com/BlastLauncher/extensions.git";
|
|
349
349
|
packageJson.version = version;
|
|
350
|
+
packageJson.scripts = Object.keys(packageJson.scripts).filter((key) => key !== "publish").reduce((obj, key) => {
|
|
351
|
+
obj[key] = packageJson.scripts[key];
|
|
352
|
+
return obj;
|
|
353
|
+
}, {});
|
|
350
354
|
import_fs_extra.default.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2), "utf8");
|
|
351
355
|
}
|
|
352
356
|
var program = new import_commander.Command();
|
|
353
|
-
program.name("blast
|
|
357
|
+
program.name("blast").description(`CLI for Blast Launcher
|
|
354
358
|
|
|
355
359
|
Example Usage:
|
|
356
360
|
blast build ./extensions/todo-list -o ./extensions/todo-list/dist
|
package/index.js
CHANGED
|
@@ -222,13 +222,21 @@ function updatePackageInfo(targetDir, version, npmOrganization) {
|
|
|
222
222
|
// add version
|
|
223
223
|
packageJson.version = version;
|
|
224
224
|
|
|
225
|
+
// exclude original publish script
|
|
226
|
+
packageJson.scripts = Object.keys(packageJson.scripts)
|
|
227
|
+
.filter((key) => key !== "publish")
|
|
228
|
+
.reduce((obj, key) => {
|
|
229
|
+
obj[key] = packageJson.scripts[key];
|
|
230
|
+
return obj;
|
|
231
|
+
}, {});
|
|
232
|
+
|
|
225
233
|
// write package.json
|
|
226
234
|
fs.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2), "utf8");
|
|
227
235
|
}
|
|
228
236
|
|
|
229
237
|
const program = new Command();
|
|
230
238
|
|
|
231
|
-
program.name("blast
|
|
239
|
+
program.name("blast").description(`CLI for Blast Launcher
|
|
232
240
|
|
|
233
241
|
Example Usage:
|
|
234
242
|
blast build ./extensions/todo-list -o ./extensions/todo-list/dist
|