npm_ex exposes npm-like workflows as Mix tasks.
Install and update
| Task | Purpose |
|---|
mix npm.init | create package.json |
mix npm.install | install dependencies from package.json |
mix npm.install package | add a package and install |
mix npm.install --frozen | fail if npm.lock is stale |
mix npm.ci | CI alias for frozen install |
mix npm.get | fetch and link from npm.lock without re-resolving |
mix npm.update | update all packages within configured ranges |
mix npm.update package | update one package |
mix npm.remove package | remove a package |
mix npm.prune | remove extraneous packages |
mix npm.rebuild | clean and reinstall from lockfile |
Inspect dependency state
Run package code
| Task | Purpose |
|---|
mix npm.run script | run a script from package.json |
mix npm.exec binary | execute a binary from node_modules/.bin |
| Task | Purpose |
|---|
mix npm.info package / mix npm.view package | show package metadata |
mix npm.search query | search the registry |
mix npm.publish | publish package to registry |
mix npm.token | manage registry auth tokens |
Verification and security
| Task | Purpose |
|---|
mix npm.verify / mix npm.check | verify node_modules matches npm.lock |
mix npm.audit | npm registry vulnerability audit |
mix npm.audit --osv | online OSV malicious-package audit |
mix npm.audit --compromised | offline malicious-package DB audit |
mix npm.doctor | diagnose setup problems |
Cache and config
Run any task with invalid arguments to see its usage string. Full task moduledocs are available in the API reference.