From 2e695c2166dc4a25c3726f03d4bb1de856a1b687 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Sun, 4 Dec 2016 00:02:58 +1100 Subject: [PATCH] refactor(packager): move the electron-packager dependency to forge instead of the users module --- package.json | 1 + src/electron-forge-package.js | 2 +- src/init/init-npm.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6c3a3261d..b56ebbf7e 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,7 @@ "bluebird": "^3.4.6", "colors": "^1.1.2", "commander": "^2.9.0", + "electron-packager": "^8.3.0", "fs-promise": "^0.5.0", "inquirer": "^1.2.1", "log-symbols": "^1.0.2", diff --git a/src/electron-forge-package.js b/src/electron-forge-package.js index 8f827ac94..8672da9aa 100644 --- a/src/electron-forge-package.js +++ b/src/electron-forge-package.js @@ -3,6 +3,7 @@ import asar from 'asar'; import fs from 'fs-promise'; import path from 'path'; import pify from 'pify'; +import packager from 'electron-packager'; import program from 'commander'; import ora from 'ora'; @@ -44,7 +45,6 @@ const main = async () => { const arch = program.arch || process.arch; const platform = program.platform || process.platform; - const packager = require(path.resolve(dir, 'node_modules/electron-packager')); // eslint-disable-line const packageOpts = { asar: true, overwrite: true, diff --git a/src/init/init-npm.js b/src/init/init-npm.js index e1a66a01e..31904d329 100644 --- a/src/init/init-npm.js +++ b/src/init/init-npm.js @@ -6,7 +6,7 @@ import username from 'username'; import installDepList from '../util/install-dependencies'; const deps = []; -const devDeps = ['babel-preset-stage-0', 'electron-packager']; +const devDeps = ['babel-preset-stage-0']; const exactDevDeps = ['electron-prebuilt-compile']; const standardDeps = ['standard']; const airbnDeps = ['eslint', 'eslint-config-airbnb', 'eslint-plugin-import',