extract utility for determing static path [2/n]

Summary: Make the logic to find the static file path reusable

Reviewed By: passy

Differential Revision: D20219731

fbshipit-source-id: a4f1fa021ea958681a078cb103621322bbfc1e48
This commit is contained in:
Michel Weststrate
2020-03-13 04:36:57 -07:00
committed by Facebook GitHub Bot
parent 72a74c9a1d
commit 1d04fc3e34
3 changed files with 47 additions and 14 deletions

View File

@@ -21,7 +21,7 @@ import {
genMercurialRevision,
} from './build-utils';
import fetch from 'node-fetch';
import {ICONS, buildLocalIconPath, getIconURL} from '../src/utils/icons';
import {getIcons, buildLocalIconPath, getIconURL} from '../src/utils/icons';
function generateManifest(versionNumber: string) {
const filePath = path.join(__dirname, '..', 'dist');
@@ -129,7 +129,7 @@ function copyStaticFolder(buildFolder: string) {
}
function downloadIcons(buildFolder: string) {
const iconURLs = Object.entries(ICONS).reduce<
const iconURLs = Object.entries(getIcons()).reduce<
{
name: string;
size: number;