chassis_forge_node library

CLI Helpers for working with Node.js, NPM, and NPX

Properties

isProject bool
True if the current folder contains a 'package.json' file.
getter/setter pair

Functions

hasNpm(IShell shell) bool
True if the current Shell has a reference to npm
hasNpx(IShell shell) bool
True if the current Shell has a reference to npx
installDependencies(IShell shell, {bool installForCi = false}) Future<void>
Installs dependencies for the current Node project
isMissingNpm(IShell shell) bool
True if the current Shell does not have a reference to npm
isMissingNpx(IShell shell) bool
True if the current Shell does not have a reference to npx
node(IShell shell, String command) Future<void>
Runs the specified npm command
nodeVersion(IShell shell) Future<String?>
Runs the current node version
npm(IShell shell, String command) Future<void>
Runs the specified npm command
npmVersion(IShell shell) Future<String?>
Runs the current npm version
npx(IShell shell, String command) Future<void>
Runs the specified npx command
npxVersion(IShell shell) Future<String?>
Runs the current npx version
test(IShell shell) Future<void>
Unit Tests the source files for the current Node project