Skip to content
Permalink
Browse files

fix(maker): add a santizied app id to the electronWinstaller config o…

…n init
  • Loading branch information
MarshallOfSound committed Dec 4, 2016
1 parent 661b1eb commit 20ae889e6f8e80930635dcf92b493c9724253731
Showing with 6 additions and 5 deletions.
  1. +1 −0 src/init/init-npm.js
  2. +1 −3 src/makers/win32/squirrel.js
  3. +1 −1 test/cli_spec.js
  4. +3 −1 tmpl/package.json
@@ -19,6 +19,7 @@ export default async (dir, lintStyle) => {
const initSpinner = ora.ora('Initializing NPM Module').start();
const packageJSON = JSON.parse(await fs.readFile(path.resolve(__dirname, '../../tmpl/package.json'), 'utf8'));
packageJSON.productName = packageJSON.name = path.basename(dir).toLowerCase();
packageJSON.config.forge.electronWinstallerConfig.name = packageJSON.name.replace(/-/g, '_');
packageJSON.author = await username();
switch (lintStyle) {
case 'standard':
@@ -7,9 +7,7 @@ export default async (dir, appName, forgeConfig, packageJSON) => { // eslint-dis
const outPath = path.resolve(dir, '../make/squirrel.windows');
await ensureDirectory(outPath);

const winstallerConfig = Object.assign({
description: 'This is the default electron-forge description, you can override it in your config',
}, forgeConfig.electronWinstallerConfig, {
const winstallerConfig = Object.assign({}, forgeConfig.electronWinstallerConfig, {
appDirectory: dir,
outputDirectory: outPath,
});
@@ -67,7 +67,7 @@ describe(`electron-forge CLI (with installer=${installer.substr(12)})`, () => {
let dir;

before(async () => {
dir = path.resolve(os.tmpdir(), `electron-forge-test-${`${Date.now()}`.substr(7)}`);
dir = path.resolve(os.tmpdir(), `electron-forge-test-${Date.now()}/electron-forge-test`);
await pSpawn(['init', dir]);
await pSpawn(['package', dir]);
});
@@ -18,7 +18,9 @@
"linux": ["deb", "rpm"]
},
"electronPackagerConfig": {},
"electronWinstallerConfig": {},
"electronWinstallerConfig": {
"name": ""
},
"electronInstallerDebian": {},
"electronInstallerRedhat": {}
}

0 comments on commit 20ae889

Please sign in to comment.
You can’t perform that action at this time.