add (vendor npm)
nexler add — vendor a front-end package
needs network + npm
nexler add <package>[@version] [flags…]
Vendors a static asset package from npm into an existing app's templates/static/vendors/<name>/, without ever giving the app itself a package.json or node_modules. Nexler shells out to npm install <package> --prefix <scratch-tmp-dir> --no-save --no-audit --no-fund in a throwaway temp directory, then copies the package's dist/ contents (flattened) — or, if it has none, the whole package minus obvious junk (tests, docs, .git, package.json, README, etc.).
| Flag | Default | Description |
|---|---|---|
| -dir | "." | Path to the app directory. |
| -as | derived from package name | Destination folder name under vendors/, e.g. @popperjs/core → popperjs-core. |
This is one of only two Nexler operations that touch the network or shell out to another process (the other is
nexler init db). It requires npm on PATH. Re-running for the same name always refreshes it — there's no -force flag. Since static assets are embedded into the app's own binary at build time, a newly vendored package isn't served until you rebuild — and Nexler never wires a <link>/<script> tag for you.nexler add bootstrap nexler add [email protected] -as bootstrap nexler add @popperjs/core