Skip to content

Latest commit

 

History

History
71 lines (42 loc) · 2.88 KB

README.md

File metadata and controls

71 lines (42 loc) · 2.88 KB

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