Files
shinyobjectz bbd7369548 One loop, raea goal: every rule in TypeScript, held at edit, render, publish and done; raea make is the asset tools
The rules are raea/goal's (sdk/goal), run by `raea goal check` at four moments: the hook after a save, every
render's end, raea cloud's publish, and the Stop hook. Rust's cut and goal gates and the box's word, sound, frame and
place checks are packs (MK30-MK39); runtime/cut-plan, runtime/goal-plan, raea make status and the box's check code
are gone with no alias (MK41).

brief.ts is the one registered root (MK43): raea runs it, and every file that imports raea must be reached from it
(the registered check, an error at publish and done). Its tasks are its `plan` (MK44), read from its run and written
back where each is written by `raea goal tasks`, the one path for the app, agents and the box. Its `goal` is one
goal or a workflow of several (MK46), each with its step, after and rules, checked and reported alone. Taste lines
and signed asks run inside the loop (MK47).

`raea goal check|tasks|seen|judge|gates|next` is the loop; `raea make clothes|motion|solid|wear|splat|physics|bake|
sao|tokensynth|sounds|component|blockout|...` the asset tools (MK45). Old names are refused with where they went.
docs/make.feature is docs/goal.feature; tools/legacy-names.sh holds the old names out.

raea's Node mode on JavaScriptCore now gives a CommonJS package's names as named exports (React's jsx), loads a
file a tool imports by URL, keeps process.exit's code from a promise callback, and reads stdin as fd 0, so the goal
runner runs on the shipped binary.
2026-11-29 16:02:31 -08:00

40 lines
1.5 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "raea add"
summary: "Add, remove and install npm packages for a project, with no Node or npm: raea.lock and node_modules."
order: 26
sources: ["io/npm/src/lib.rs"]
---
A composition can import npm packages. `raea add` resolves them, fetches each tarball once into a store every project
shares (`~/.raea/npm/store`, checked against the registry's hash) and lays out `node_modules` the way pnpm does. The
resolution is kept in `raea.lock` beside `package.json`, so an install with nothing new asks the registry nothing.
```sh
raea add d3-shape@^3 culori
raea add --dev @types/d3-shape
raea remove culori
raea install --offline
```
Install scripts never run, since there is no Node to run them; a package that needs one is named in the report.
<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
## Usage
```sh
raea add PKG[@RANGE]... [--dev] | remove NAME... | install [--offline] [--in DIR] (npm packages for the project: raea.lock, node_modules)
```
Headless: it needs nothing running and opens no window. Takes any number of arguments besides its flags.
## Flags
| Flag | Takes | What it does |
| --- | --- | --- |
| `--dev` | – | Add the packages as dev dependencies. |
| `--in` | `DIR` | The project folder holding `package.json` (the current folder by default). |
| `--offline` | – | With `install`: use only what `raea.lock` and the store already have, asking the registry nothing. |
<!-- generated:end -->