@runfile/cli 1.1.6 → 1.2.0
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 +7 -5
- package/bin/darwin-arm64/run +0 -0
- package/bin/darwin-x64/run +0 -0
- package/bin/linux-arm64/run +0 -0
- package/bin/linux-x64/run +0 -0
- package/bin/run.js +1 -4
- package/bin/win32-arm64/run.exe +0 -0
- package/bin/win32-x64/run.exe +0 -0
- package/package.json +2 -3
- package/bin/darwin-arm64/runfile-lsp +0 -0
- package/bin/darwin-x64/runfile-lsp +0 -0
- package/bin/linux-arm64/runfile-lsp +0 -0
- package/bin/linux-x64/runfile-lsp +0 -0
- package/bin/runfile-lsp.js +0 -32
- package/bin/win32-arm64/runfile-lsp.exe +0 -0
- package/bin/win32-x64/runfile-lsp.exe +0 -0
package/README.md
CHANGED
|
@@ -817,9 +817,9 @@ actually decrypts, so a locked keyring never gets in the way of an unrelated tar
|
|
|
817
817
|
|
|
818
818
|
## Editor support
|
|
819
819
|
|
|
820
|
-
`
|
|
821
|
-
documentation on hover — from the same parser `run` itself uses, so your editor never
|
|
822
|
-
actually happen.
|
|
820
|
+
`run :lsp` is a language server, so the binary you already have gives you diagnostics, completion, formatting,
|
|
821
|
+
go-to-definition and documentation on hover — from the same parser `run` itself uses, so your editor never
|
|
822
|
+
disagrees with what will actually happen. There is nothing extra to install.
|
|
823
823
|
|
|
824
824
|
Hover anything: a function shows its signature, what it does and a worked example; a property adds whether it
|
|
825
825
|
may sit inside a block; `$`, `exec`, `run`, `retry`, `match` and the rest explain the line form itself.
|
|
@@ -838,8 +838,10 @@ same command in a `.sh` file. Set `"editor.formatOnSave": true` and saving forma
|
|
|
838
838
|
**JetBrains IDEs** read the same grammar: *Settings → Editor → TextMate Bundles*, add the `editors/vscode`
|
|
839
839
|
directory from a checkout.
|
|
840
840
|
|
|
841
|
-
**Zed, Neovim and Helix**
|
|
842
|
-
|
|
841
|
+
**Zed, Neovim and Helix** point their language-server configuration at `run` with the argument `:lsp` — in
|
|
842
|
+
Neovim, `vim.lsp.config("runfile", { cmd = { "run", ":lsp" }, filetypes = { "runfile" } })` — and take the
|
|
843
|
+
tree-sitter grammar in `editors/tree-sitter` for highlighting, with highlight queries included. For Neovim
|
|
844
|
+
with nvim-treesitter:
|
|
843
845
|
|
|
844
846
|
```lua
|
|
845
847
|
require("nvim-treesitter.parsers").get_parser_configs().runfile = {
|
package/bin/darwin-arm64/run
CHANGED
|
Binary file
|
package/bin/darwin-x64/run
CHANGED
|
Binary file
|
package/bin/linux-arm64/run
CHANGED
|
Binary file
|
package/bin/linux-x64/run
CHANGED
|
Binary file
|
package/bin/run.js
CHANGED
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
const path = require('node:path');
|
|
3
3
|
const { spawnSync } = require('node:child_process');
|
|
4
4
|
const KEY = process.platform + '-' + process.arch;
|
|
5
|
-
|
|
6
|
-
// decided by this file's own name, so the second is a copy, not a second file.
|
|
7
|
-
const NAME = path.basename(__filename, ".js");
|
|
8
|
-
const EXE = process.platform === "win32" ? `${NAME}.exe` : NAME;
|
|
5
|
+
const EXE = process.platform === "win32" ? "run.exe" : "run";
|
|
9
6
|
const BINARIES = {
|
|
10
7
|
"linux-x64": EXE,
|
|
11
8
|
"linux-arm64": EXE,
|
package/bin/win32-arm64/run.exe
CHANGED
|
Binary file
|
package/bin/win32-x64/run.exe
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bin": {
|
|
3
|
-
"run": "bin/run.js"
|
|
4
|
-
"runfile-lsp": "bin/runfile-lsp.js"
|
|
3
|
+
"run": "bin/run.js"
|
|
5
4
|
},
|
|
6
5
|
"description": "Runfile CLI — a cross-platform command runner with its own small language",
|
|
7
6
|
"engines": {
|
|
@@ -14,5 +13,5 @@
|
|
|
14
13
|
"license": "MIT",
|
|
15
14
|
"name": "@runfile/cli",
|
|
16
15
|
"repository": "https://github.com/JoaaoVerona/runfile",
|
|
17
|
-
"version": "1.
|
|
16
|
+
"version": "1.2.0"
|
|
18
17
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/runfile-lsp.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
const path = require('node:path');
|
|
3
|
-
const { spawnSync } = require('node:child_process');
|
|
4
|
-
const KEY = process.platform + '-' + process.arch;
|
|
5
|
-
// One launcher for both binaries, `run` and `runfile-lsp`: which one is
|
|
6
|
-
// decided by this file's own name, so the second is a copy, not a second file.
|
|
7
|
-
const NAME = path.basename(__filename, ".js");
|
|
8
|
-
const EXE = process.platform === "win32" ? `${NAME}.exe` : NAME;
|
|
9
|
-
const BINARIES = {
|
|
10
|
-
"linux-x64": EXE,
|
|
11
|
-
"linux-arm64": EXE,
|
|
12
|
-
"darwin-arm64": EXE,
|
|
13
|
-
"darwin-x64": EXE,
|
|
14
|
-
"win32-x64": EXE,
|
|
15
|
-
"win32-arm64": EXE,
|
|
16
|
-
};
|
|
17
|
-
const bin = BINARIES[KEY];
|
|
18
|
-
|
|
19
|
-
if (!bin) {
|
|
20
|
-
console.error(`run: unsupported platform ${KEY}. Supported: ${Object.keys(BINARIES).join(', ')}`);
|
|
21
|
-
process.exit(1);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const binPath = path.join(__dirname, KEY, bin);
|
|
25
|
-
const result = spawnSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
|
|
26
|
-
|
|
27
|
-
if (result.error) {
|
|
28
|
-
console.error(`run: failed to spawn ${binPath}: ${result.error.message}`);
|
|
29
|
-
process.exit(1);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
process.exit(result.status == null ? 1 : result.status);
|
|
Binary file
|
|
Binary file
|