refactor(maker): add packageJSON to the function arguments
This commit is contained in:
Родитель
5c5ce67a79
Коммит
e8e1054ae5
|
@ -68,7 +68,7 @@ const main = async () => {
|
|||
}
|
||||
}
|
||||
try {
|
||||
await (maker.default || maker)(packageDir, packageJSON.productName || packageJSON.name, forgeConfig);
|
||||
await (maker.default || maker)(packageDir, packageJSON.productName || packageJSON.name, forgeConfig, packageJSON);
|
||||
} catch (err) {
|
||||
makeSpinner.fail();
|
||||
if (err) throw err;
|
||||
|
|
|
@ -4,7 +4,7 @@ import pify from 'pify';
|
|||
|
||||
import { ensureFile } from '../../util/ensure-output';
|
||||
|
||||
export default async (dir, appName, forgeConfig) => {
|
||||
export default async (dir, appName, forgeConfig, packageJSON) => { // eslint-disable-line
|
||||
const outPath = path.resolve(dir, '../make', `${path.basename(dir)}.dmg`);
|
||||
await ensureFile(outPath);
|
||||
const dmgConfig = Object.assign({
|
||||
|
|
|
@ -18,7 +18,7 @@ const zipPromise = (from, to) =>
|
|||
});
|
||||
});
|
||||
|
||||
export default async (dir, appName, forgeConfig) => { // eslint-disable-line
|
||||
export default async (dir, appName, forgeConfig, packageJSON) => { // eslint-disable-line
|
||||
const zipPath = path.resolve(dir, '../make', `${path.basename(dir)}.zip`);
|
||||
await ensureFile(zipPath);
|
||||
switch (process.platform) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import pify from 'pify';
|
|||
|
||||
import { ensureFile } from '../../util/ensure-output';
|
||||
|
||||
export default async (dir, appName, forgeConfig) => {
|
||||
export default async (dir, appName, forgeConfig, packageJSON) => { // eslint-disable-line
|
||||
const outPath = path.resolve(dir, '../make/debian');
|
||||
|
||||
await ensureFile(outPath);
|
||||
|
|
|
@ -3,7 +3,7 @@ import path from 'path';
|
|||
|
||||
import { ensureDirectory } from '../../util/ensure-output';
|
||||
|
||||
export default async (dir, appName, forgeConfig) => {
|
||||
export default async (dir, appName, forgeConfig, packageJSON) => { // eslint-disable-line
|
||||
const outPath = path.resolve(dir, '../make/squirrel.windows');
|
||||
await ensureDirectory(outPath);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче