An extension pack for using medic with NodeJS projects or projects that build assets with Node.
brew tap synchronal/tap
brew install medic-ext-nodeExample Brewfile:
tap 'synchronal/tap'
brew 'synchronal/tap/medic'
brew 'synchronal/tap/medic-ext-node'[doctor]
checks = [
{ check = "homebrew" },
{ check = "asdf", command = "plugin-installed", args = { plugin = "nodejs" } },
{ check = "asdf", command = "package-installed", args = { plugin = "nodejs" } },
{ check = "node", command = "corepack-shim-installed", args = { name = "pnpm", version = "8.6.5" } },
{ check = "node", command = "packages-installed", args = { prefix = "assets" } },
]
[outdated]
checks = [
{ check = "node", cd = "subdirectory" }
]Checks for whether a Node project is configured.
Corepack is a library that ships with modern versions of Node, providing bridges between package managers. Libraries may require pnpm, yarn, etc in order to be compiled, and through corepack be installable from npm.
medic-check-node corepack-shim-installed --name <name> --version <version>
medic-check-node corepack-shim-installed --name pnpm --version 8.6.5Is npm available in the PATH?
medic-check-node npm-existsAre all packages installed? Optionally change directories to another
project, or pass prefix to npm when checking for installed packages.
medic-check-node packaged-installed
medic-check-node packaged-installed --cd <dir>
medic-check-node packaged-installed --prefix <dir>Check for outdated packages.