Reference
wf scope
What a path picker lists at a place: the names in scope there, each with its type and where it comes from, and the fields to go on into
wf scope PLACE [options]
Lists the names that can be read at one place in a source file — what an editor's path picker and completion offer there.
$ wf scope src/pages/Deploys.wf:24
$ wf scope src/pages/Deploys.wf:24:9 --json
$ wf scope src/templates/invoice.wf:3 --data data/invoice.json
The names come in the order a path picker lists them:
- the page's or component's own
stateandderivedvalues, and the form it binds; - its props, and a page's route parameters;
- what the statements around the place bind — a loop's item and index, an
if let, amatcharm, a slot's fill, an action's parameters and thelets before the place — innermost first; - the members of every store it
uses; - with
--data, the template's data.
Each row has its type as the checker infers it, its shape (bool, number, text, moment, list, record, enum …), whether it may be null, where it comes from (for d in live, member of Deploys), and a record's fields to go on into (d.region.code). The library has it as webfluent::scope (with the internals feature, outside semver).
Options
| Option | Type | Meaning |
|---|---|---|
PLACE | text | The place: |
--dir -d DIR | path | Project directory (default: current directory) |
--data DATA | path | A template's data, a JSON file, to list after the scope |
--json | flag | Print JSON, for tools |