@interopio/iocd-cli 0.0.45 → 0.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -33,6 +33,14 @@ module.exports = {
|
|
|
33
33
|
if (!packageJson.devDependencies.electron) {
|
|
34
34
|
packageJson.devDependencies["electron"] = "38.0.0";
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
// the way Squirrel works is that it expects the productName to match the exe name. When we copy the iocd to dist for packaging we need to follow the pattern in the path:
|
|
38
|
+
// windows -> dist/{productName}-{platform}-{arch}/{productSlug}.exe (this is because on windows we want the final exe to use the slugified name)
|
|
39
|
+
// macOS -> dist/{productName}-{platform}-{arch}/{productName}.app (this is because on macOS we want to keep the productName as is in the final app bundle)
|
|
40
|
+
// to make this happen we set the productName in package.json to {{PRODUCT_NAME}} and then override it here for windows builds to be {{PRODUCT_SLUG}}
|
|
41
|
+
if (process.platform === 'win32') {
|
|
42
|
+
packageJson.productName = packageJson.name;
|
|
43
|
+
}
|
|
36
44
|
return packageJson;
|
|
37
45
|
}
|
|
38
46
|
},
|