From 472ef7e01e51dfd22aca08a127446294aeae21e4 Mon Sep 17 00:00:00 2001 From: develar Date: Mon, 13 Feb 2017 07:58:41 +0100 Subject: [PATCH] feat: --config option Close #1229 --- .idea/dictionaries/develar.xml | 1 + packages/electron-builder/src/builder.ts | 3 +++ test/out/__snapshots__/BuildTest.js.snap | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+) diff --git a/.idea/dictionaries/develar.xml b/.idea/dictionaries/develar.xml index 771434ce53d..bfaf269b66d 100644 --- a/.idea/dictionaries/develar.xml +++ b/.idea/dictionaries/develar.xml @@ -4,6 +4,7 @@ actperepo addincludedir addons + addplugindir adminrequired allusersnotpossible amazonaws diff --git a/packages/electron-builder/src/builder.ts b/packages/electron-builder/src/builder.ts index 8937cc108c5..090b2a27197 100644 --- a/packages/electron-builder/src/builder.ts +++ b/packages/electron-builder/src/builder.ts @@ -159,6 +159,9 @@ export function normalizeOptions(args: CliOptions): BuildOptions { delete result.x64 delete result.armv7l + if (result.project != null && result.projectDir == null) { + result.projectDir = result.project + } delete result.project return result } diff --git a/test/out/__snapshots__/BuildTest.js.snap b/test/out/__snapshots__/BuildTest.js.snap index 6a8229dd7e5..3ce16f185c3 100644 --- a/test/out/__snapshots__/BuildTest.js.snap +++ b/test/out/__snapshots__/BuildTest.js.snap @@ -1,9 +1,11 @@ exports[`test cli 1`] = ` Object { + "config": undefined, "draft": undefined, "extraMetadata": undefined, "prepackaged": undefined, "prerelease": undefined, + "projectDir": undefined, "publish": undefined, "targets": Map { Platform { @@ -19,10 +21,12 @@ Object { exports[`test cli 2`] = ` Object { + "config": undefined, "draft": undefined, "extraMetadata": undefined, "prepackaged": undefined, "prerelease": undefined, + "projectDir": undefined, "publish": undefined, "targets": Map { Platform { @@ -40,10 +44,12 @@ Object { exports[`test cli 3`] = ` Object { + "config": undefined, "draft": undefined, "extraMetadata": undefined, "prepackaged": undefined, "prerelease": undefined, + "projectDir": undefined, "publish": undefined, "targets": Map { Platform { @@ -61,10 +67,12 @@ Object { exports[`test cli 4`] = ` Object { + "config": undefined, "draft": undefined, "extraMetadata": undefined, "prepackaged": undefined, "prerelease": undefined, + "projectDir": undefined, "publish": undefined, "targets": Map { Platform { @@ -80,10 +88,12 @@ Object { exports[`test cli 5`] = ` Object { + "config": undefined, "draft": undefined, "extraMetadata": undefined, "prepackaged": undefined, "prerelease": undefined, + "projectDir": undefined, "publish": undefined, "targets": Map { Platform { @@ -99,10 +109,12 @@ Object { exports[`test cli 6`] = ` Object { + "config": undefined, "draft": undefined, "extraMetadata": undefined, "prepackaged": undefined, "prerelease": undefined, + "projectDir": undefined, "publish": undefined, "targets": Map { Platform { @@ -132,10 +144,12 @@ Object { exports[`test cli 7`] = ` Object { + "config": undefined, "draft": undefined, "extraMetadata": undefined, "prepackaged": undefined, "prerelease": undefined, + "projectDir": undefined, "publish": undefined, "targets": Map { Platform { @@ -153,10 +167,12 @@ Object { exports[`test cli 8`] = ` Object { + "config": undefined, "draft": undefined, "extraMetadata": undefined, "prepackaged": undefined, "prerelease": undefined, + "projectDir": undefined, "publish": undefined, "targets": Map { Platform { @@ -174,10 +190,12 @@ Object { exports[`test cli 9`] = ` Object { + "config": undefined, "draft": undefined, "extraMetadata": undefined, "prepackaged": undefined, "prerelease": undefined, + "projectDir": undefined, "publish": undefined, "targets": Map { Platform { @@ -195,10 +213,12 @@ Object { exports[`test cli 10`] = ` Object { + "config": undefined, "draft": undefined, "extraMetadata": undefined, "prepackaged": undefined, "prerelease": undefined, + "projectDir": undefined, "publish": undefined, "targets": Map { Platform {