aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2021-11-11 12:31:14 +0200
committerIgor Pashev <pashev.igor@gmail.com>2021-11-11 12:31:14 +0200
commitc1c6ddc2e3fc0d3a183507c6a08ae98d240738ee (patch)
tree9643f65607b4b88d8280d698972870e508a84b77
parent0833889474040bfc0ed73b86adb2b9d7ef7db1f0 (diff)
downloadnpm.nix-c1c6ddc2e3fc0d3a183507c6a08ae98d240738ee.tar.gz
Preserve pkg.dependencies
-rw-r--r--README.md3
-rw-r--r--npmPackages/_scripts/strip.js3
2 files changed, 4 insertions, 2 deletions
diff --git a/README.md b/README.md
index dae614a..6289044 100644
--- a/README.md
+++ b/README.md
@@ -126,6 +126,9 @@ $ cat color-convert/package.json
"conversions.js",
"route.js"
]
+ "dependencies": {
+ "color-name": "file:/nix/store/2k0qqdcf64mdv80hnnakpxrvkjwi99fr-nodejs-14.17.3-color-name-1.1.4"
+ }
}
$ ls -lh color-convert/node_modules/
diff --git a/npmPackages/_scripts/strip.js b/npmPackages/_scripts/strip.js
index 526730d..1ac90e7 100644
--- a/npmPackages/_scripts/strip.js
+++ b/npmPackages/_scripts/strip.js
@@ -28,7 +28,6 @@ for (var i = 0; i < args.length; i++) {
pipeThrough((pkg, done) => {
switch (phase) {
case 'postInstall':
- delete pkg.dependencies;
// fall throw
case 'preInstall':
@@ -52,4 +51,4 @@ pipeThrough((pkg, done) => {
}
done(pkg);
-}); \ No newline at end of file
+});