Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including gulp-cordova-icon with all npm packages installed. Try it out:

var gulpCordovaIcon = require("gulp-cordova-icon")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

gulp-cordova-icon v0.7.2

Generate all the icons for your Cordova build automatically


Generate all the icons for your Cordova build automatically


$ npm install --save-dev gulp-cordova-icon

This library depends on GraphicsMagick or ImageMagick, so be sure to install one of those.


const create = require('gulp-cordova-create'),
const icon = require('gulp-cordova-icon'),
const android = require('gulp-cordova-android');

gulp.task('build', () => {
    return gulp.src('dist')

When the project is build for a platform, the icon provided will be used as application icon. It will generate all the different sizes of the icon and puts them in the correct location.


icon(file [, options])


Type: string

The path to the png or svg icon that will be used as application icon.


Type: object


Type: string
Default: lenient

The error handling strategy of the process. This field has 3 possible values:

  • lenient (default): any encountered error is silently discarded and the build continues
  • warn: any encountered error is logged as a warning on the console
  • throw: any encountered error is thrown and interrupts the Gulp stream

Type: boolean
Default: false

Use ImageMagick instead of GraphicsMagick.


See gulp-cordova for the full list of available packages.


MIT © Sam Verschueren


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free