mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Parse files extensions other than png
This commit is contained in:
@@ -1269,18 +1269,20 @@ var consumeControlFile = function (controlFilePath, cordovaPath) {
|
||||
files.mkdir_p(resourcesPath);
|
||||
|
||||
verboseLog('Copying resources for mobile apps');
|
||||
// XXX makes a big assumption that every file is a png
|
||||
var setImages = function (sizes, xmlEle, tag) {
|
||||
_.each(sizes, function (size, name) {
|
||||
var width = size.split('x')[0];
|
||||
var height = size.split('x')[1];
|
||||
|
||||
if (! _.has(imagePaths[tag], name))
|
||||
var suppliedPath = imagePaths[tag][name];
|
||||
if (! suppliedPath)
|
||||
return;
|
||||
|
||||
var fileName = name + '.' + tag + '.png';
|
||||
var extension = _.last(_.last(suppliedPath.split(path.sep)).split('.'));
|
||||
var fileName = name + '.' + tag + '.' + extension;
|
||||
|
||||
// copy the file to the build folder with a standardized name
|
||||
files.copyFile(path.join(project.rootDir, imagePaths[tag][name]),
|
||||
files.copyFile(path.join(project.rootDir, suppliedPath),
|
||||
path.join(resourcesPath, fileName));
|
||||
|
||||
// set it to the xml tree
|
||||
|
||||
Reference in New Issue
Block a user