mirror of https://github.com/status-im/metro.git
packager: buck library: expose asset content
Reviewed By: davidaurelio Differential Revision: D4945778 fbshipit-source-id: ea132a3d284ed09c59c69afbdd7b707af9e521b9
This commit is contained in:
parent
b58e5dc930
commit
82dcddcb12
|
@ -68,7 +68,7 @@ export type GetTransformOptions = (
|
||||||
getDependenciesOf: string => Promise<Array<string>>,
|
getDependenciesOf: string => Promise<Array<string>>,
|
||||||
) => Promise<ExtraTransformOptions>;
|
) => Promise<ExtraTransformOptions>;
|
||||||
|
|
||||||
type AssetDescriptor = {
|
export type AssetDescriptor = {
|
||||||
+__packager_asset: boolean,
|
+__packager_asset: boolean,
|
||||||
+httpServerLocation: string,
|
+httpServerLocation: string,
|
||||||
+width: ?number,
|
+width: ?number,
|
||||||
|
@ -79,7 +79,7 @@ type AssetDescriptor = {
|
||||||
+type: string,
|
+type: string,
|
||||||
};
|
};
|
||||||
|
|
||||||
type ExtendedAssetDescriptor = AssetDescriptor & {
|
export type ExtendedAssetDescriptor = AssetDescriptor & {
|
||||||
+fileSystemLocation: string,
|
+fileSystemLocation: string,
|
||||||
+files: Array<string>,
|
+files: Array<string>,
|
||||||
};
|
};
|
||||||
|
|
|
@ -140,3 +140,11 @@ export type LibraryOptions = {|
|
||||||
platform?: string,
|
platform?: string,
|
||||||
root: string,
|
root: string,
|
||||||
|};
|
|};
|
||||||
|
|
||||||
|
export type Base64Content = string;
|
||||||
|
|
||||||
|
export type Library = {|
|
||||||
|
files: Array<TransformedFile>,
|
||||||
|
/* cannot be a Map because it's JSONified later on */
|
||||||
|
assets: {[destFilePath: string]: Base64Content},
|
||||||
|
|};
|
||||||
|
|
Loading…
Reference in New Issue