Allow saving source maps during build
Summary: This makes it possible to save source maps to a separate folder so we can upload them from CI. Reviewed By: nikoant Differential Revision: D29521599 fbshipit-source-id: a137659092b7648858b97ecf5b5c60c88889517a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d99b476bcb
commit
04616ad647
@@ -26,6 +26,7 @@ import {
|
||||
getVersionNumber,
|
||||
genMercurialRevision,
|
||||
prepareDefaultPlugins,
|
||||
moveSourceMaps,
|
||||
} from './build-utils';
|
||||
import fetch from '@adobe/node-fetch-retry';
|
||||
import {getIcons, buildLocalIconPath, getIconURL} from '../app/src/utils/icons';
|
||||
@@ -93,6 +94,11 @@ const argv = yargs
|
||||
'Directory with prepared list of default plugins which will be included into the Flipper distribution as "defaultPlugins" dir',
|
||||
type: 'string',
|
||||
},
|
||||
'source-map-dir': {
|
||||
describe:
|
||||
'Directory to write the main.bundle.map and bundle.map files for the main and render bundle sourcemaps, respectively',
|
||||
type: 'string',
|
||||
},
|
||||
})
|
||||
.help()
|
||||
.strict()
|
||||
@@ -360,6 +366,7 @@ function downloadIcons(buildFolder: string) {
|
||||
await copyStaticFolder(dir);
|
||||
await downloadIcons(dir);
|
||||
await compileRenderer(dir);
|
||||
await moveSourceMaps(dir, argv['source-map-dir']);
|
||||
const versionNumber = getVersionNumber(argv.version);
|
||||
const hgRevision = await genMercurialRevision();
|
||||
await modifyPackageManifest(dir, versionNumber, hgRevision, argv.channel);
|
||||
|
||||
Reference in New Issue
Block a user