Remove child-process-es6-promise
Summary: We're using two libraries to do the same thing. The other one is better. Reviewed By: mweststrate Differential Revision: D18954485 fbshipit-source-id: 33ed2f452badf30cb72c69661527edc54708efba
This commit is contained in:
committed by
Facebook Github Bot
parent
61df5de3ed
commit
acc2f293bd
@@ -130,7 +130,6 @@
|
|||||||
"ansi-to-html": "^0.6.3",
|
"ansi-to-html": "^0.6.3",
|
||||||
"async-mutex": "^0.1.3",
|
"async-mutex": "^0.1.3",
|
||||||
"chalk": "^3.0.0",
|
"chalk": "^3.0.0",
|
||||||
"child-process-es6-promise": "^1.2.1",
|
|
||||||
"codemirror": "^5.25.0",
|
"codemirror": "^5.25.0",
|
||||||
"cross-env": "^6.0.3",
|
"cross-env": "^6.0.3",
|
||||||
"dashify": "^2.0.0",
|
"dashify": "^2.0.0",
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const path = require('path');
|
|||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const builder = require('electron-builder');
|
const builder = require('electron-builder');
|
||||||
const Platform = builder.Platform;
|
const Platform = builder.Platform;
|
||||||
const cp = require('child-process-es6-promise');
|
const cp = require('promisify-child-process');
|
||||||
const {
|
const {
|
||||||
buildFolder,
|
buildFolder,
|
||||||
compile,
|
compile,
|
||||||
@@ -62,15 +62,16 @@ function modifyPackageManifest(buildFolder, versionNumber, hgRevision) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildDist(buildFolder) {
|
async function buildDist(buildFolder) {
|
||||||
const targetsRaw = [];
|
const targetsRaw = [];
|
||||||
const postBuildCallbacks = [];
|
const postBuildCallbacks = [];
|
||||||
|
|
||||||
if (process.argv.indexOf('--mac') > -1) {
|
if (process.argv.indexOf('--mac') > -1) {
|
||||||
targetsRaw.push(Platform.MAC.createTarget(['dir']));
|
targetsRaw.push(Platform.MAC.createTarget(['dir']));
|
||||||
postBuildCallbacks.push(() =>
|
postBuildCallbacks.push(() =>
|
||||||
cp.spawn('zip', ['-yr9', '../Flipper-mac.zip', 'Flipper.app'], {
|
cp.spawn('zip', ['-qyr9', '../Flipper-mac.zip', 'Flipper.app'], {
|
||||||
cwd: path.join(__dirname, '..', 'dist', 'mac'),
|
cwd: path.join(__dirname, '..', 'dist', 'mac'),
|
||||||
|
encoding: 'utf-8',
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -96,8 +97,8 @@ function buildDist(buildFolder) {
|
|||||||
electronDownload.cache = process.env.electron_config_cache;
|
electronDownload.cache = process.env.electron_config_cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
return builder
|
try {
|
||||||
.build({
|
await builder.build({
|
||||||
publish: 'never',
|
publish: 'never',
|
||||||
config: {
|
config: {
|
||||||
appId: `com.facebook.sonar`,
|
appId: `com.facebook.sonar`,
|
||||||
@@ -110,9 +111,11 @@ function buildDist(buildFolder) {
|
|||||||
},
|
},
|
||||||
projectDir: buildFolder,
|
projectDir: buildFolder,
|
||||||
targets,
|
targets,
|
||||||
})
|
});
|
||||||
.then(() => Promise.all(postBuildCallbacks.map(p => p())))
|
return await Promise.all(postBuildCallbacks.map(p => p()));
|
||||||
.catch(die);
|
} catch (err) {
|
||||||
|
return die(err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function copyStaticFolder(buildFolder) {
|
function copyStaticFolder(buildFolder) {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const compilePlugins = require('../static/compilePlugins');
|
|||||||
const tmp = require('tmp');
|
const tmp = require('tmp');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const cp = require('child-process-es6-promise');
|
const cp = require('promisify-child-process');
|
||||||
|
|
||||||
function die(err) {
|
function die(err) {
|
||||||
console.error(err.stack);
|
console.error(err.stack);
|
||||||
|
|||||||
@@ -2541,11 +2541,6 @@ chardet@^0.7.0:
|
|||||||
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
|
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
|
||||||
integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
|
integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
|
||||||
|
|
||||||
child-process-es6-promise@^1.2.1:
|
|
||||||
version "1.2.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/child-process-es6-promise/-/child-process-es6-promise-1.2.1.tgz#3634950521b49d5cad9735cbcc8d69cf1e4d0cab"
|
|
||||||
integrity sha512-ekKf2tD+2B2AZvLBhrBb44oelJSjeBkG3dZHpF5oIC9xhePhI3cAMqxyAxLMmskpc81GfCodSRh29wshnsOd/g==
|
|
||||||
|
|
||||||
chownr@^1.1.1, chownr@^1.1.3:
|
chownr@^1.1.1, chownr@^1.1.3:
|
||||||
version "1.1.3"
|
version "1.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142"
|
resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142"
|
||||||
|
|||||||
Reference in New Issue
Block a user