From 94dccde1af6ad6866d36f21e19d6df61b4c27ef5 Mon Sep 17 00:00:00 2001 From: Niels Kooiman Date: Thu, 14 Mar 2019 21:33:56 +0100 Subject: [PATCH] shorter version of pkg-update --- pkg-update.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg-update.js b/pkg-update.js index 33d2d20..a452af8 100644 --- a/pkg-update.js +++ b/pkg-update.js @@ -1,4 +1,2 @@ -const fs = require('fs'); -const { spawn } = require('child_process'); -const packageInfo = JSON.parse(fs.readFileSync("./package.json")); -spawn('npm', ['install', '--save-dev', ...Object.keys(packageInfo.devDependencies)], {stdio: 'inherit', detached: true}); \ No newline at end of file +const json = JSON.parse(require('fs').readFileSync("package.json")); +require('child_process').spawn('npm', ['i', '-D', ...Object.keys(json.devDependencies)], {stdio: 'inherit', detached: true}); \ No newline at end of file