@runfile/cli 0.40.0 → 0.42.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Runfile
2
2
 
3
- [Quick start](#quick-start) · [Why Runfile?](#why-runfile) · [Features](#what-makes-it-different) · [Platforms](#platform-support) · [Docs](.github/DOCS.md)
3
+ [Quick start](#quick-start) · [Why Runfile?](#why-runfile) · [Features](#what-makes-it-different) · [VS Code](#vs-code-extension) · [Platforms](#platform-support) · [Docs](.github/DOCS.md)
4
4
 
5
5
  **One JSON file. One binary. Every OS. Every shell.**
6
6
 
@@ -98,6 +98,30 @@ prints that command to run from a fresh shell (npm can't overwrite the running `
98
98
 
99
99
  ---
100
100
 
101
+ ## VS Code extension
102
+
103
+ Every release ships a VS Code extension that puts your targets in the editor — no `tasks.json` to generate or keep
104
+ in sync. It runs `run :generate task-descriptors` and turns the result into real VS Code tasks plus a
105
+ **Runfile → Targets** sidebar, complete with namespace folders and a **Globals** bucket for machine-wide targets.
106
+
107
+ **Install** — download `runfile-vscode-<version>.vsix` from the
108
+ [latest release](https://github.com/JoaaoVerona/runfile/releases/latest), then:
109
+
110
+ ```bash
111
+ code --install-extension runfile-vscode-<version>.vsix
112
+ ```
113
+
114
+ (or, in VS Code: **Extensions → … → Install from VSIX…**)
115
+
116
+ Targets then show up in **Terminal → Run Task…** and in the Runfile sidebar. Every task is invoked with
117
+ `--stdin-args`, so targets that need input prompt for it right in the task terminal. Nothing is written to your
118
+ repository.
119
+
120
+ The source lives in [`editors/vscode`](editors/vscode) — see its [README](editors/vscode/README.md) for settings,
121
+ commands, and how the sidebar groups targets.
122
+
123
+ ---
124
+
101
125
  ## Why Runfile?
102
126
 
103
127
  Other runners assume one platform and one shell. Runfile assumes **none**.
@@ -629,14 +653,9 @@ $ run :generate zed-tasks
629
653
  $ run :generate jetbrains-run-configurations
630
654
  ```
631
655
 
632
- Pass `--stdout` to any of these to print the generated configuration to standard output instead of
633
- writing it to disk — handy for previewing, piping, or diffing in CI. The output is the freshly
634
- generated config (not merged with any existing file on disk) and nothing is created or modified.
635
- For `jetbrains-run-configurations`, which produces one file per target, each block is delimited by a
636
- `<!-- .run/<file> -->` comment when more than one is emitted.
637
-
638
- By default only the local Runfile's own targets are generated. Two independent flags widen the set,
639
- and both compose with `--stdout` and the on-disk writers:
656
+ Each writes its editor's config to disk (`.vscode/tasks.json`, `.zed/tasks.json`, `.run/*.run.xml`),
657
+ merging with any existing file. By default only the local Runfile's own targets are generated; two
658
+ independent flags widen the set:
640
659
 
641
660
  - `--include-namespaces` also generates entries for targets pulled in via `includes` — namespaced
642
661
  targets carry their `namespace:` prefixes, exactly as `run :list` shows them (e.g. `run api:build`).
@@ -644,6 +663,39 @@ and both compose with `--stdout` and the on-disk writers:
644
663
  `run :config global-files` — the same ones `run :list` folds in. Handy when an editor integration
645
664
  should offer your machine-wide targets (e.g. `run c`, `run backup-git`) alongside a project's own.
646
665
 
666
+ ##### Building your own integration: `task-descriptors`
667
+
668
+ For tooling that builds its **own** editor integration (like the
669
+ [Runfile VS Code extension](editors/vscode) shipped with this repo), there's an editor-agnostic
670
+ alternative that always prints to stdout and never touches disk:
671
+
672
+ ```bash
673
+ $ run :generate task-descriptors
674
+ ```
675
+
676
+ It always resolves `includes` and merges registered global files (no `--include-*` flags), and emits
677
+ a stable JSON document describing every runnable target grouped by its source file, with per-target
678
+ provenance so a client can bucket local vs. included vs. global targets itself:
679
+
680
+ ```jsonc
681
+ {
682
+ "formatVersion": 1,
683
+ "sources": [
684
+ {
685
+ "filePath": "/abs/path/Runfile.json",
686
+ "kind": "local", // "local" | "included" | "global"
687
+ "targets": [
688
+ {
689
+ "name": "api:build", // full canonical invocation name
690
+ "namespace": "api", // omitted for un-namespaced targets
691
+ "description": "Build the API"
692
+ }
693
+ ]
694
+ }
695
+ ]
696
+ }
697
+ ```
698
+
647
699
  Skip a target from the generated configs by setting `metadata.excludeFromGenerateCommand: true`. The
648
700
  `metadata` block on `globals` and on each target is **fully open** — any property of any JSON type
649
701
  (strings, numbers, booleans, arrays, deeply-nested objects) is accepted and round-trips untouched, so
@@ -747,6 +799,16 @@ run lint # auto-format + clippy
747
799
  run test # full workspace test suite
748
800
  ```
749
801
 
802
+ The VS Code extension in [`editors/vscode`](editors/vscode) has its own targets, namespaced under `vscode:`:
803
+
804
+ ```bash
805
+ run vscode:deps # one-time: pnpm install (required before the targets below)
806
+ run vscode:compile # type-check + compile to editors/vscode/out
807
+ run vscode:watch # recompile on change
808
+ run vscode:package # build the .vsix
809
+ run vscode:install # package + install into VS Code
810
+ ```
811
+
750
812
  ---
751
813
 
752
814
  ## License
Binary file
Binary file
Binary file
package/bin/linux-x64/run CHANGED
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -13,5 +13,5 @@
13
13
  "license": "MIT",
14
14
  "name": "@runfile/cli",
15
15
  "repository": "https://github.com/JoaaoVerona/runfile",
16
- "version": "0.40.0"
16
+ "version": "0.42.0"
17
17
  }