Commit 9de07a46 authored by Jeremy Bokobza's avatar Jeremy Bokobza Committed by GitHub

Merge pull request #131 from dangershony/b-pack

Adding the path argument to the build
parents 5cc40b70 01bc3404
"use strict"; "use strict";
var packager = require('electron-packager'); var packager = require('electron-packager');
const pkg = require('./package.json'); const pkg = require('./package.json');
...@@ -10,6 +10,7 @@ const shouldUseAsar = argv.asar || false; ...@@ -10,6 +10,7 @@ const shouldUseAsar = argv.asar || false;
const shouldBuildAll = argv.all || false; const shouldBuildAll = argv.all || false;
const arch = argv.arch || 'all'; const arch = argv.arch || 'all';
const platform = argv.platform || 'darwin'; const platform = argv.platform || 'darwin';
const path = argv.path || 'app-builds';
const DEFAULT_OPTS = { const DEFAULT_OPTS = {
dir: './dist', dir: './dist',
...@@ -19,7 +20,7 @@ const DEFAULT_OPTS = { ...@@ -19,7 +20,7 @@ const DEFAULT_OPTS = {
}; };
pack(platform, arch, function done(err, appPath) { pack(platform, arch, path, function done(err, appPath) {
if (err) { if (err) {
console.log(err); console.log(err);
} else { } else {
...@@ -28,7 +29,8 @@ pack(platform, arch, function done(err, appPath) { ...@@ -28,7 +29,8 @@ pack(platform, arch, function done(err, appPath) {
}); });
function pack(plat, arch, cb) { function pack(plat, arch, path, cb) {
// there is no darwin ia32 electron // there is no darwin ia32 electron
if (plat === 'darwin' && arch === 'ia32') return; if (plat === 'darwin' && arch === 'ia32') return;
...@@ -52,7 +54,7 @@ function pack(plat, arch, cb) { ...@@ -52,7 +54,7 @@ function pack(plat, arch, cb) {
prune: true, prune: true,
overwrite: true, overwrite: true,
all: shouldBuildAll, all: shouldBuildAll,
out: `app-builds` out: path
}); });
console.log(opts) console.log(opts)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment