Splicon is a command-line tool and library for generating icons and splash screens for Cordova projects. It generates the images for each platform's required sizes using a single source SVG and updates the project's config.xml.
It was originally built for use in ember-cordova.
It is built for Node 0.12+ but may work on earlier versions.
For an integration example, see the ember-cordova
Using the CLI, from your Cordova project, run:
This command will:
- Look for a file called 'icon.svg';
- Resize the SVG for each required platform/icon combination;
- Move the icons to res/icons/platformName (and create the dir if it does not exist);
- Update your config.xml to represent the new icons & paths;
- Ensure there are no duplicate icon nodes in config.xml;
By default, images for all platforms will be generated. To generate images for specific platforms you can pass the platforms as arguments:
splicon-icons ios android windows
For more granular control (such as setting the destination path), you will need to require src/icon-task and run the function yourself.
There is a TODO to enhance CLI flag, but in most cases this is handled in ember-cordova.
splicon-icons, by default images for all platforms will be generated. To
generate images for specific platforms you can pass the platforms as arguments:
PRs are very welcome. You can read our style guides here.
If you are unsure about your contribution idea, please feel free to open an issue for feedback.