Node.js
makeNodeJsModules
Cook the node_modules
directory
for the given Node.js project
using node2nix.
Types:
- makeNodeJsModules (
function { ... } -> package
):- name (
str
): Custom name to assign to the build step, be creative, it helps in debugging. - nodeJsVersion (
enum [ "18" "20" "21" ]
): Node.js version to use. - packageJson (
package
): Path to thepackage.json
of your project. - packageLockJson (
package
): Path to thepackage-lock.json
of your project. - packageOverrides (
Attrs
): Optional. Override behaviors when buildingnode_modules
. See node2nix arguments for more.
- name (
Example:
makeNodeJsEnvironment
Setup a makeNodeJsModules
in the environment
using makeSearchPaths
.
It appends:
node
toPATH
.node_modules/.bin
toPATH
.node_modules
to NODE_PATH.
Pre-requisites: Generating a package-lock.json
Types:
- makeNodeJsEnvironment (
function { ... } -> package
):- name (
str
): Custom name to assign to the build step, be creative, it helps in debugging. - nodeJsVersion (
enum [ "18" "20" "21" ]
): Node.js version to use. - packageJson (
package
): Path to thepackage.json
of your project. - packageLockJson (
package
): Path to thepackage-lock.json
of your project. - packageOverrides (
Attrs
): Optional. Override behaviors when buildingnode_modules
. See node2nix arguments for more.
- name (
Example: