From 48eba0242dee2060c750acaa39b35af34c320753 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Fri, 21 Aug 2020 01:46:55 -0700 Subject: [PATCH] Removed unused file. --- scripts/common.js | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 scripts/common.js diff --git a/scripts/common.js b/scripts/common.js deleted file mode 100644 index eb070c20..00000000 --- a/scripts/common.js +++ /dev/null @@ -1,29 +0,0 @@ -const { spawn } = require('child_process'); - -function getDatabase() { - return process.env.DATABASE_URL.split(':')[0]; -} - -function runCommand(cmd, args = []) { - return new Promise((resolve, reject) => { - const child = spawn(cmd, args); - - child.stdout.on('data', data => process.stdout.write(data)); - - child.stderr.on('data', data => process.stdout.write(data)); - - child.on('error', err => reject(err)); - - child.on('exit', (code, signal) => resolve({ code, signal })); - }); -} - -function getNpmCommand() { - return /^win/.test(process.platform) ? 'npm.cmd' : 'npm'; -} - -module.exports = { - getDatabase, - runCommand, - getNpmCommand, -};