mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-12-23 02:28:55 +00:00
Make app package.json
name to be kebab cased for robustness
This commit is contained in:
parent
96c99b21a4
commit
364993bfcd
@ -35,6 +35,7 @@
|
||||
"cheerio": "^0.19.0",
|
||||
"commander": "^2.9.0",
|
||||
"electron-packager": "^5.2.1",
|
||||
"lodash": "^4.0.0",
|
||||
"ncp": "^2.0.0",
|
||||
"request": "^2.67.0",
|
||||
"tmp": "0.0.28",
|
||||
|
@ -5,6 +5,7 @@ import packager from 'electron-packager';
|
||||
import tmp from 'tmp';
|
||||
import ncp from 'ncp';
|
||||
import async from 'async';
|
||||
import _ from 'lodash';
|
||||
|
||||
const copy = ncp.ncp;
|
||||
|
||||
@ -85,7 +86,7 @@ function copyPlaceholderApp(srcAppDir, tempDir, name, targetURL, badge, width, h
|
||||
// change name of packageJson so that temporary files will not be shared across different app instances
|
||||
const packageJsonPath = path.join(tempDir, '/package.json');
|
||||
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath));
|
||||
packageJson.name = appArgs.name + '-nativefier';
|
||||
packageJson.name = _.kebabCase(appArgs.name + '-nativefier');
|
||||
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson));
|
||||
|
||||
callback(null, tempDir);
|
||||
|
Loading…
Reference in New Issue
Block a user