Skip to content
Permalink
Browse files

feat(importer): import now sets the scripts section in package.json t…

…o be forge scripts

Fixes #63
  • Loading branch information
MarshallOfSound authored and malept committed Jan 7, 2017
1 parent 9e2aefa commit cb01d40667af5541d00712a8fcf73fa528b6ebea
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/api/import.js
@@ -108,6 +108,15 @@ export default async (providedOptions = {}) => {
}
}

packageJSON.scripts = packageJSON.scripts || {};
d('reading current scripts object:', packageJSON.scripts);

packageJSON.scripts.start = 'electron-forge start';
packageJSON.scripts.package = 'electron-forge package';
packageJSON.scripts.make = 'electron-forge make';

d('forgified scripts object:', packageJSON.scripts);

const writeChanges = async () => {
await asyncOra('Writing modified package.json file', async () => {
await fs.writeFile(path.resolve(dir, 'package.json'), `${JSON.stringify(packageJSON, null, 2)}\n`);

0 comments on commit cb01d40

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