diff --git a/index.js b/index.js index b83ef55..94e41ca 100644 --- a/index.js +++ b/index.js @@ -39,8 +39,14 @@ var getPlatforms = function (projectName) { { name: 'icon-20.png', size : 20 }, { name: 'icon-20@2x.png', size : 40 }, { name: 'icon-20@3x.png', size : 60 }, + { name: 'icon-24@2x.png', size : 48 }, + { name: 'icon-27.5@2x.png', size : 55 }, + { name: 'icon-29.png', size : 29 }, + { name: 'icon-29@2x.png', size : 58 }, + { name: 'icon-29@3x.png', size : 87 }, { name: 'icon-40.png', size : 40 }, { name: 'icon-40@2x.png', size : 80 }, + { name: 'icon-44@2x.png', size : 88 }, { name: 'icon-50.png', size : 50 }, { name: 'icon-50@2x.png', size : 100 }, { name: 'icon-60@2x.png', size : 120 }, @@ -50,6 +56,8 @@ var getPlatforms = function (projectName) { { name: 'icon-76.png', size : 76 }, { name: 'icon-76@2x.png', size : 152 }, { name: 'icon-83.5@2x.png', size : 167 }, + { name: 'icon-86@2x.png', size : 172 }, + { name: 'icon-98@2x.png', size : 196 }, { name: 'icon-1024.png', size : 1024 }, { name: 'icon-small.png', size : 29 }, { name: 'icon-small@2x.png', size : 58 }, @@ -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({ @@ -211,6 +231,8 @@ 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'); @@ -218,6 +240,9 @@ var generateIcon = function (platform, icon) { 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); diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..4a70aa0 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,170 @@ +{ + "name": "cordova-icon", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "colors": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", + "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "fs-extra": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "glob": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.0.tgz", + "integrity": "sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==" + }, + "imagemagick": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/imagemagick/-/imagemagick-0.1.3.tgz", + "integrity": "sha1-dIPOoJO02fLi85aFetyIIbU3xWo=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "klaw": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", + "requires": { + "graceful-fs": "^4.1.9" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "requires": { + "glob": "^7.1.3" + } + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "underscore": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", + "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + } + }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" + } + } +}