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 the current node module to NODE_PATH
|
||||
# - sets HOME=$TMPDIR, as this is required by some npm scripts
|
||||
# TODO: don't install dev dependencies. Load into NODE_PATH instead
|
||||
d2nInstallDependenciesPhase = ''
|
||||
# symlink dependency packages into node_modules
|
||||
for dep in $(cat $nodeDepsPath); do
|
||||
|
@ -14,7 +14,7 @@
|
||||
inputDirectories,
|
||||
inputFiles,
|
||||
|
||||
dev,
|
||||
noDev,
|
||||
nodejs,
|
||||
...
|
||||
}@args:
|
||||
@ -22,6 +22,8 @@
|
||||
|
||||
b = builtins;
|
||||
|
||||
dev = ! noDev;
|
||||
|
||||
packageLock =
|
||||
if inputDirectories != [] then
|
||||
"${lib.elemAt inputDirectories 0}/package-lock.json"
|
||||
@ -141,8 +143,8 @@
|
||||
|
||||
extraArgs = {
|
||||
|
||||
dev = {
|
||||
description = "include dependencies for development";
|
||||
noDev = {
|
||||
description = "Whether to exclude development dependencies";
|
||||
type = "flag";
|
||||
};
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
# extraArgs
|
||||
name,
|
||||
dev,
|
||||
noDev,
|
||||
optional,
|
||||
peer,
|
||||
...
|
||||
@ -23,6 +23,7 @@
|
||||
|
||||
let
|
||||
b = builtins;
|
||||
dev = ! noDev;
|
||||
yarnLock = utils.readTextFile "${lib.elemAt inputDirectories 0}/yarn.lock";
|
||||
packageJSON = b.fromJSON (b.readFile "${lib.elemAt inputDirectories 0}/package.json");
|
||||
parser = import ../yarn-lock/parser.nix { inherit lib; inherit (externals) nix-parsec;};
|
||||
@ -225,8 +226,8 @@
|
||||
type = "argument";
|
||||
};
|
||||
|
||||
dev = {
|
||||
description = "Whether to include development dependencies";
|
||||
noDev = {
|
||||
description = "Whether to exclude development dependencies";
|
||||
type = "flag";
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user