View Source Nodelix (nodelix v1.0.0-alpha.5)
Nodelix is an installer and runner for Node.js.
Warning
This is a pre-release version. As such, anything may change at any time, the public API should not be considered stable, and using a pinned version is recommended.
Profiles
You can define multiple nodelix profiles. By default, there is a
profile called :default
which you can configure its args, current
directory and environment:
config :nodelix,
version: "20.10.0",
default: [
args: ~w(
some-script.js
--some-option
),
cd: Path.expand("../assets", __DIR__),
]
The default current directory is your project's root.
Nodelix configuration
There are two global configurations for the nodelix application:
:version
- the expected Node.js version:cacerts_path
- the directory to find certificates for https connections
Summary
Functions
Returns the configuration for the given profile.
Returns the configured Node.js version.
Installs, if not available, and then runs node
.
Runs the given command with args
.
Functions
Returns the configuration for the given profile.
Returns nil if the profile does not exist.
Returns the configured Node.js version.
Installs, if not available, and then runs node
.
Returns the same as run/2
.
Runs the given command with args
.
The given args will be appended to the configured args. The task output will be streamed directly to stdio. It returns the status of the underlying call.