mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-11-30 10:07:33 +03:00
nodejs: enable dev deps by default
This commit is contained in:
parent
6850db9cc4
commit
2fd7782af4
@ -227,6 +227,7 @@ let
|
|||||||
# - adds executables of direct node dependencies to PATH
|
# - adds executables of direct node dependencies to PATH
|
||||||
# - adds the current node module to NODE_PATH
|
# - adds the current node module to NODE_PATH
|
||||||
# - sets HOME=$TMPDIR, as this is required by some npm scripts
|
# - sets HOME=$TMPDIR, as this is required by some npm scripts
|
||||||
|
# TODO: don't install dev dependencies. Load into NODE_PATH instead
|
||||||
d2nInstallDependenciesPhase = ''
|
d2nInstallDependenciesPhase = ''
|
||||||
# symlink dependency packages into node_modules
|
# symlink dependency packages into node_modules
|
||||||
for dep in $(cat $nodeDepsPath); do
|
for dep in $(cat $nodeDepsPath); do
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
inputDirectories,
|
inputDirectories,
|
||||||
inputFiles,
|
inputFiles,
|
||||||
|
|
||||||
dev,
|
noDev,
|
||||||
nodejs,
|
nodejs,
|
||||||
...
|
...
|
||||||
}@args:
|
}@args:
|
||||||
@ -22,6 +22,8 @@
|
|||||||
|
|
||||||
b = builtins;
|
b = builtins;
|
||||||
|
|
||||||
|
dev = ! noDev;
|
||||||
|
|
||||||
packageLock =
|
packageLock =
|
||||||
if inputDirectories != [] then
|
if inputDirectories != [] then
|
||||||
"${lib.elemAt inputDirectories 0}/package-lock.json"
|
"${lib.elemAt inputDirectories 0}/package-lock.json"
|
||||||
@ -141,8 +143,8 @@
|
|||||||
|
|
||||||
extraArgs = {
|
extraArgs = {
|
||||||
|
|
||||||
dev = {
|
noDev = {
|
||||||
description = "include dependencies for development";
|
description = "Whether to exclude development dependencies";
|
||||||
type = "flag";
|
type = "flag";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
# extraArgs
|
# extraArgs
|
||||||
name,
|
name,
|
||||||
dev,
|
noDev,
|
||||||
optional,
|
optional,
|
||||||
peer,
|
peer,
|
||||||
...
|
...
|
||||||
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
b = builtins;
|
b = builtins;
|
||||||
|
dev = ! noDev;
|
||||||
yarnLock = utils.readTextFile "${lib.elemAt inputDirectories 0}/yarn.lock";
|
yarnLock = utils.readTextFile "${lib.elemAt inputDirectories 0}/yarn.lock";
|
||||||
packageJSON = b.fromJSON (b.readFile "${lib.elemAt inputDirectories 0}/package.json");
|
packageJSON = b.fromJSON (b.readFile "${lib.elemAt inputDirectories 0}/package.json");
|
||||||
parser = import ../yarn-lock/parser.nix { inherit lib; inherit (externals) nix-parsec;};
|
parser = import ../yarn-lock/parser.nix { inherit lib; inherit (externals) nix-parsec;};
|
||||||
@ -225,8 +226,8 @@
|
|||||||
type = "argument";
|
type = "argument";
|
||||||
};
|
};
|
||||||
|
|
||||||
dev = {
|
noDev = {
|
||||||
description = "Whether to include development dependencies";
|
description = "Whether to exclude development dependencies";
|
||||||
type = "flag";
|
type = "flag";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user