Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mwbrooks/web2splash
A PhoneGap splash screen generator using an HTML document as a template.
https://github.com/mwbrooks/web2splash
Last synced: 3 months ago
JSON representation
A PhoneGap splash screen generator using an HTML document as a template.
- Host: GitHub
- URL: https://github.com/mwbrooks/web2splash
- Owner: mwbrooks
- License: apache-2.0
- Created: 2012-09-17T23:11:32.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2015-03-17T19:53:08.000Z (almost 10 years ago)
- Last Synced: 2024-09-28T19:01:25.612Z (3 months ago)
- Language: JavaScript
- Size: 238 KB
- Stars: 28
- Watchers: 8
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# web2splash [![Build Status][travis-ci-img]][travis-ci-url]
> A PhoneGap splash screen generator using an HTML document as a template.
## About
Web2Splash will generate every splash screen for every PhoneGap platform.
A splash screen is the startup image displayed while your PhoneGap application
loads. Since the image needs to match the device's screen size, you typically
need to create multiple images for each platform. Even more annoying is that
most platforms have devices with different screen aspect-ratios. This means
a simple image resize will not cut it.Rather than creating a large master image that is cropped, it makes more sense
to use a responsive HTML document. As PhoneGap developer, you've already
created a responsive HTML web application. It makes sense to reuse your skills
to create the splash screens.This tool reads in an HTML document into a headless Webkit browser, resizes
the viewport to each splash screen size, and then renders an image.## Supported Platforms
- Android
- Bada
- BlackBerry
- iOS
- webOS
- Windows Phone## Install
1. [Download and Install PhantomJs](http://phantomjs.org/)
2. `ln -s /path/to/download/bin/phantomjs /usr/local/bin/phantomjs`
3. `npm install [-g] web2splash`## Usage
### Command-Line
$ web2splash --help
$ web2splash http://example.com/
$ web2splash path/to/template.html path/to/output/dir### node.js
var web2splash = require('web2splash');
web2splash.onRenderImage = function(image) {
// image.name, image.width, image.height
};web2splash.render(input, output, function(e) {
// done
});[travis-ci-img]: https://secure.travis-ci.org/mwbrooks/web2splash.png
[travis-ci-url]: http://travis-ci.org/mwbrooks/web2splash