[ReactNative] Copy assets to corresponding folders on Android

This commit is contained in:
Alex Kotliarskyi 2015-06-01 12:09:52 -07:00
parent d548c85da6
commit d723e17629
2 changed files with 3 additions and 2 deletions

View File

@ -175,7 +175,7 @@ describe('resolveAssetSource', () => {
isStatic: true,
width: 100,
height: 200,
uri: 'assets_awesomemodule_subdir_logo1_',
uri: 'awesomemodule_subdir_logo1_',
});
});
});

View File

@ -50,7 +50,8 @@ function getPathInArchive(asset) {
return (assetDir + '/' + asset.name)
.toLowerCase()
.replace(/\//g, '_') // Encode folder structure in file name
.replace(/([^a-z0-9_])/g, ''); // Remove illegal chars
.replace(/([^a-z0-9_])/g, '') // Remove illegal chars
.replace(/^assets_/, ''); // Remove "assets_" prefix
} else {
// E.g. 'assets/AwesomeModule/icon@2x.png'
return getScaledAssetPath(asset);