-
-
Notifications
You must be signed in to change notification settings - Fork 0
Pattern npm
m-wells edited this page Feb 21, 2026
·
2 revisions
Example: gemini-cli
npm packages bundle all dependencies within node_modules/, making them self-contained.
arch=('any')
depends=('nodejs')
makedepends=('npm')
source=("https://registry.npmjs.org/@scope/package/-/package-${pkgver}.tgz")
package() {
npm install -g --prefix "${pkgdir}/usr" \
--cache "${srcdir}/npm-cache" \
"${srcdir}/${pkgname}-${pkgver}.tgz"
}-
arch=('any')- JavaScript is platform-independent - Only runtime dep is
nodejs - Dependencies bundled in package (not system packages)
- Source is pre-built tarball from npm registry
If the package emits deprecation warnings (common with latest Node.js), replace the symlink with a wrapper:
#!/bin/bash
export NODE_OPTIONS="--no-deprecation"
exec /usr/lib/node_modules/package/bin/entry.js "$@"# scripts/packages/example.sh
check_npm "example" "@scope/package"Navigation
Build Patterns
Infrastructure