ember-cli-cordova
ember-cli-cordova copied to clipboard
Splash Screen and Icon support
Feature proposal
initial proposal for how this would work
Add a single icon file under cordova root directory
Add a single splash screen image (2048x2048) under cordova root directory
on cdv:build
- convert icons into required formats
- copy icons into appropriate directory
- will copy splashscreen appropriate directory
Cordova Splash Screen and Icon documentation
config
- Make sure
added to res config.xml
code reference https://gist.github.com/LinusU/7515016
- will this feature convert the icon into all densities and sizes
I'm cool with it converting icons. Since those are all squash dimensions it's easy is something I want in my projects. We can't do that with splash screens though unfortunately since they are all different dimensions.
- if it converts file, will this happen every time cordova build is run ?
- will the icons be copied every time cordova build is run ?
- if feature is run every time, how will this impact performance?
I think that would be overkill. Since I'm pretty much expecting people to run cdv:build
to build for the app store and such I think we can expect that to be run and convert them then.
added the information, anything else you want to add to the feature task list ?
We can probably use these libs to do this: https://github.com/AlexDisler/cordova-icon and https://github.com/AlexDisler/cordova-splash It does have an ImageMagick dependency so I we'd need to make sure to properly warn user if we find the icon/splashscreen files and attempt to convert them. and they don't have it, but that'll be easy
thats a good idea, nice find :)
Just a thought, should the icon file and splashscreen file be added to root of the cli project or root of the cordova project?
@billybonks The cordova root would be good. Since it's specific to cordova and there's already enough things in the cli root
I forked another lib at one point and modified it a lot to be able to do exactly this in a grunt workflow. Now that I'm converting from the grunt based one to this I'd be willing to convert it for use here.
https://github.com/runspired/grunt-phantom-svg2png
@runspired does it have any dependencies ? for eg the libs @jakecraige suggested require ImageMagick to be installed on the computer
The only "complicated" one is phantomjs, which ember-cli already recommends be installed globally. Otherwise it's pretty straightforward.
@billybonks @runspired I feel like we could safely assume phantomjs in installed since ember-cli uses it for ember test
anyways. And If not, we can just warn that this feature doesn't work without it. I'd love if either of you wanted to take this on. I have no preference on which lib to use
i think that if we can get the version running with phantomJS it would be better, though not sure how to structure it. does grunt play nicely with embercli, should it be moved into broccoli etc
@billybonks It definitely needs to be moved to broccoli or just use fs
directly. We can't add grunt as a dependency, lol
I'll rewrite it as a broccoli task, won't have time until late tonight and tomorrow to work on it, so expect an update near the end of the week.
sounds good.
I needed to get #85 rolling before this, but with my PR submitted for that I've got time now to do that rewrite.
I've also been thinking about doing automated screenshots, either via https://github.com/gitawego/cordova-screenshot or http://phantomjs.org/screen-capture.html
Essentially the idea would be to define various routes and controller/model states at which you want to generate screenshots on varying devices for the Apple/Android stores. Thoughts?
@runspired Now that would be mega-cool. That's always something I've found annoying to manually do
How is this coming along?
I am super excited about this feature. In the long term by adding more features along the line of this to ember-cli-cordova and pairing it up with liquid-fire we can create a real ionicframework.com competitor built upon the ember ecosystem.
Bright :star::star::star::star:s ahead :)
I have a grunt plugin that does this, but have not converted to broccoli yet.
for reference, this is the grunt plugin that I need to move to being a broccoli plugin https://github.com/runspired/grunt-phantom-rasterize
Also I think we can do splashscreen support by having a background and a main area that are specified and then sizing the main area appropriately and centering it and sizing the background appropriately.
@runspired that sounds great. looking forward to see how you go with it.