mobisplash v0.2.2
mobisplash 
Mobile app splash screen generator
Install
$ npm install --save mobisplashGraphicsMagick
This library depends on GraphicsMagick, so be sure to install this library as well.
Mac OSX
$ brew install graphicsmagickLinux
$ sudo apt-get install graphicsmagickWindows
Manual installation or via chocolatey.
$ choco install graphicsmagickUsage
const mobisplash = require('mobisplash');
mobisplash('logo.png', {platform: 'ios'}).then(() => {
// splash screens generated
});
mobisplash('logo.svg', {platform: 'android', draw9patch: false}).then(() => {
// splash screens generated
});API
mobisplash(file, options)
file
Type: string
Source file of the splash screen.
options
platform
Required
Type: string
Values: android ios blackberry10
Platform to generate the splash screens for.
orientation
Type: string
Values: both portrait landscape
Default: both
Orientation to generate the splash screens for.
background
Type: string
Default: white
Color of the splash screen background.
contentRatio
Type: number
Default: 0.8
Logo-splash screen ratio. 1 means the logo will fill up the entire width (or height) of the splash screen.
draw9patch
Type: boolean
Default: true
9-patch the Android splash screens.
dest
Type: string
Default: process.cwd()
Directory to save the generated splash screens to.
Platforms
The supported platforms are Android, iOS and BlackBerry 10. Every platform generates a different set of icons.
Android
drawable-ldpi-land/splash.pngdrawable-mdpi-land/splash.pngdrawable-hdpi-land/splash.pngdrawable-xhdpi-land/splash.pngdrawable-xxhdpi-land/splash.pngdrawable-xxxhdpi-land/splash.pngdrawable-ldpi-port/splash.pngdrawable-mdpi-port/splash.pngdrawable-hdpi-port/splash.pngdrawable-xhdpi-port/splash.pngdrawable-xxhdpi-port/splash.pngdrawable-xxxhdpi-port/splash.png
iOS
Default-667h.pngDefault-736h.pngDefault-Landscape-736h.pngDefault-568h@2x~iphone.pngDefault~iphone.pngDefault@2x~iphone.pngDefault-Landscape~ipad.pngDefault-Landscape@2x~ipad.pngDefault-Portrait~ipad.pngDefault-Portrait@2x~ipad.png
BlackBerry 10
splash-1280x720.pngsplash-720x1280.pngsplash-1280x768.pngsplash-768x1280.pngsplash-720x720.pngsplash-1440x1440.png
Related
- mobisplash-cli - CLI for this module
- mobicon - Mobile app icon generator
License
MIT © Sam Verschueren