Skip to content
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.

Add new IOS paths #143

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,14 @@ var getPlatforms = function (projectName) {
{ name: 'icon-20.png', size : 20 },
{ name: '[email protected]', size : 40 },
{ name: '[email protected]', size : 60 },
{ name: '[email protected]', size : 48 },
{ name: '[email protected]', size : 55 },
{ name: 'icon-29.png', size : 29 },
{ name: '[email protected]', size : 58 },
{ name: '[email protected]', size : 87 },
{ name: 'icon-40.png', size : 40 },
{ name: '[email protected]', size : 80 },
{ name: '[email protected]', size : 88 },
{ name: 'icon-50.png', size : 50 },
{ name: '[email protected]', size : 100 },
{ name: '[email protected]', size : 120 },
Expand All @@ -50,6 +56,8 @@ var getPlatforms = function (projectName) {
{ name: 'icon-76.png', size : 76 },
{ name: '[email protected]', size : 152 },
{ name: '[email protected]', size : 167 },
{ name: '[email protected]', size : 172 },
{ name: '[email protected]', size : 196 },
{ name: 'icon-1024.png', size : 1024 },
{ name: 'icon-small.png', size : 29 },
{ name: '[email protected]', size : 58 },
Expand Down Expand Up @@ -83,7 +91,19 @@ var getPlatforms = function (projectName) {
{ name : 'mipmap-mdpi/icon.png', size : 48 },
{ name : 'mipmap-xhdpi/icon.png', size : 96 },
{ name : 'mipmap-xxhdpi/icon.png', size : 144 },
{ name : 'mipmap-xxxhdpi/icon.png', size : 192 }
{ name : 'mipmap-xxxhdpi/icon.png', size : 192 },
{ name : 'mipmap-hdpi/ic_launcher.png', size : 72 },
{ name : 'mipmap-ldpi/ic_launcher.png', size : 36 },
{ name : 'mipmap-mdpi/ic_launcher.png', size : 48 },
{ name : 'mipmap-xhdpi/ic_launcher.png', size : 96 },
{ name : 'mipmap-xxhdpi/ic_launcher.png', size : 144 },
{ name : 'mipmap-xxxhdpi/ic_launcher.png', size : 192 },
{ name : 'mipmap-hdpi-v26/ic_launcher_foreground.png', size : 72 },
{ name : 'mipmap-ldpi-v26/ic_launcher_foreground.png', size : 36 },
{ name : 'mipmap-mdpi-v26/ic_launcher_foreground.png', size : 48 },
{ name : 'mipmap-xhdpi-v26/ic_launcher_foreground.png', size : 96 },
{ name : 'mipmap-xxhdpi-v26/ic_launcher_foreground.png', size : 144 },
{ name : 'mipmap-xxxhdpi-v26/ic_launcher_foreground.png', size : 192 },
]
});
platforms.push({
Expand Down Expand Up @@ -211,13 +231,18 @@ var getProjectName = function () {
* @return {Promise}
*/
var generateIcon = function (platform, icon) {
console.log(platform);
console.log(icon);
var deferred = Q.defer();
var srcPath = settings.ICON_FILE;
var platformPath = srcPath.replace(/\.png$/, '-' + platform.name + '.png');
if (fs.existsSync(platformPath)) {
srcPath = platformPath;
}
var dstPath = platform.iconsPath + icon.name;
console.log('platformPath' + platformPath);
console.log('srcPAth: ' + srcPath);
console.log('iconsPath: ' + platform.iconsPath);
var dst = path.dirname(dstPath);
if (!fs.existsSync(dst)) {
fs.mkdirsSync(dst);
Expand Down
170 changes: 170 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.