Skip to content

Commit

Permalink
basic guide (#2988)
Browse files Browse the repository at this point in the history
Merging before porting to capacitor-site
  • Loading branch information
dotNetkow authored Jun 1, 2020
1 parent 2c4e72f commit 4aa5709
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
1 change: 1 addition & 0 deletions site/docs-md/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* [Cordova/Ionic Native Plugins](cordova/using-cordova-plugins.md)
* [Known Incompatible Plugins](cordova/known-incompatible-plugins.md)
* Guides
* [Splash Screens and Icons](guides/splash-screens-icons.md)
* [Ionic Framework Camera App](guides/ionic-framework-app.md)
* [Push Notifications - Firebase](guides/push-notifications-firebase.md)
* [Deep Links](guides/deep-links.md)
Expand Down
17 changes: 16 additions & 1 deletion site/docs-md/cordova/migrating-from-cordova-to-capacitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,22 @@ Both android and ios folders at the root of the project are created. These are e

## Splash Screens and Icons

If you've previously created icon and splash screen images, they can be found in the top-level `resources` folder of your project. [Follow this guide](https://www.joshmorony.com/adding-icons-splash-screens-launch-images-to-capacitor-projects/) to move them over to each native project.
If you've previously created icon and splash screen images, they can be found in the top-level `resources` folder of your project. With those images in place, you can use the `cordova-res` tool to generate icons and splash screens for Capacitor-based iOS and Android projects.

First, install `cordova-res`:

```bash
$ npm install -g cordova-res
```

Next, run the following to regenerate the images and copy them into the native projects:

```bash
$ cordova-res ios --skip-config --copy
$ cordova-res android --skip-config --copy
```

[Complete details here](https://github.com/ionic-team/cordova-res#capacitor).

## Migrate Plugins

Expand Down
32 changes: 32 additions & 0 deletions site/docs-md/guides/splash-screens-icons.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: Creating Splash Screens and Icons
description: Use cordova-res to generate resource images for native projects
url: /docs/guides/splash-screens-and-icons
contributors:
- dotnetkow
---

# Creating Splash Screens and Icons

Initial support for splash screen and icon generation is now available. For complete details, see the [cordova-res docs](https://github.com/ionic-team/cordova-res).

First, install `cordova-res`:

```bash
$ npm install -g cordova-res
```

`cordova-res` expects a Cordova-like structure: place one icon and one splash screen file in a top-level `resources` folder within your project, like so:

```
resources/
├── icon.png
└── splash.png
```

Next, run the following to generate all images then copy them into the native projects:

```bash
$ cordova-res ios --skip-config --copy
$ cordova-res android --skip-config --copy
```

0 comments on commit 4aa5709

Please sign in to comment.