Skip to content

ns0m/cordova-splash

 
 

Repository files navigation

Fork of the AlexDisler/cordova-splash package with some fixes. Latest Published Version

npm install @ns0m/cordova-splash

Adding local run, with or without options:

const cordovaSplash = require('@ns0m/cordova-splash');

await cordovaSplash();
await cordovaSplash({project: '/path/to/helloCdv/', splash: '/path/to/images/splash.png'});
await cordovaSplash({'xcode-old': true});
await cordovaSplash({'android-old': true});
await cordovaSplash({storyboard: 'device'});   /* one of 'device', 'universal', or 'single' (default) */

cordova-splash

Automatic splash screen generator for Cordova. Create a splash screen and use cordova-splash to automatically crop and copy it for all the platforms your project supports (currently works with iOS, Android and Windows 10).

The splash screen image should be 2208x2208 px with a center square of about 1200x1200 px. The image may be cropped around the center square. You can also use larger images with similar proportions.

Installation

$ sudo npm install cordova-splash -g

If you are using an older version of cordova (before 7.x):

$ sudo npm install [email protected] -g

Requirements

Usage

Create a splash.png file in the root folder of your cordova project and run:

$ cordova-splash

You also can specify manually a location for your cordova project or splash.png:

$ cordova-splash --project=/path/to/helloCdv/ --splash=/path/to/images/splash.png

If you run an old version of Cordova for iOS and you need your files in /Resources/icons/, use this option:

$ cordova-splash --xcode-old

If you run an old version of Cordova for Android and you need your files in /res/, use this option:

$ cordova-splash --android-old

You can specify manually the variant for iOS Launch Storyboard generation, among device, universal, or single (default):

$ cordova-splash --storyboard="device"

Notes:

  • Cordova's config.xml file will not be updated by the tool (because images are automatically created in the good folders)
  • Therefore, in Cordova's config.xml file, be sure to remove all lines looking like <splash src="res/screen/android/splash-land-mdpi.png" density="land-mdpi"/>

Icons

Check out cordova-icon

License

MIT

About

Automatic splash screen generator for Cordova

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%