-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 569789b
Showing
54 changed files
with
9,250 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.idea/ | ||
node_modules/ | ||
.vscode/ | ||
*.map | ||
.DS_Store | ||
.sourcemaps | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
## You can import like this in a component: | ||
|
||
//import imgUrl from '../assets/imgs/logo.png' | ||
//<img src=${imgUrl} alt="Loading Icon"> | ||
|
||
//Or like this: | ||
//<img src="/imgs/logo.png" alt="Loading Icon"> | ||
|
||
//First method it takes the compiled version of vite inside src/assets or src/whatever into www/assets(compiled). | ||
//Second method it takes the copied version of vite inside src/public into www/ | ||
//That is why using the first method you cannot point from HTML but from JS directly | ||
|
||
|
||
## From the index.html | ||
You can referenciate it as relative path ./ as vite will take care | ||
|
||
|
||
---- Icons and Splash | ||
First, install @capacitor/assets: | ||
|
||
npm install @capacitor/assets --save-dev | ||
|
||
Provide icon and splash screen source images using this folder/filename structure: | ||
|
||
assets/ | ||
├── icon-only.png | ||
├── icon-foreground.png | ||
├── icon-background.png | ||
├── splash.png | ||
└── splash-dark.png | ||
|
||
Icon files should be at least 1024px x 1024px. | ||
Splash screen files should be at least 2732px x 2732px. | ||
The format can be jpg or png. | ||
Then generate (which applies to your native projects or generates a PWA manifest file): | ||
|
||
npx capacitor-assets generate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Capacitor Assets | ||
|
||
This tool will crop and resize JPEG and PNG source images to generate icons and splash screens for iOS, Android, and Progressive Web Apps using Capacitor. | ||
|
||
Note: previous versions of this tool supported Cordova but Cordova support has been removed as of 1.x. We strongly recommend teams migrate to Capacitor. | ||
|
||
Install | ||
|
||
npm install --save-dev @capacitor/assets | ||
Usage | ||
|
||
The tool expects a assets or resources folder to exist in the root of the project. | ||
|
||
There are two modes this tool can be used in: Easy Mode, and Full Control mode. | ||
|
||
Usage - Easy Mode (recommended) | ||
|
||
With Easy Mode, the tool supports generating all the icon and splash assets you need for iOS, Android, and PWA from a single logo file along with an optional dark mode logo, and background colors. This is the easiest way to generate all your assets, but it trades customizability for convenience. | ||
|
||
To use this mode, create a single logo.png or icon.png with an optional logo-dark.png in assets/ (the tool also supports using SVG files as source images, substitue .svg as needed): | ||
|
||
assets/ | ||
├── logo.png | ||
└── logo-dark.png | ||
Then, generate the assets and provide the background colors that will be used to generate background layers for icons: | ||
|
||
npx @capacitor/assets generate --iconBackgroundColor '#eeeeee' --iconBackgroundColorDark '#222222' --splashBackgroundColor '#eeeeee' --splashBackgroundColorDark '#111111' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"appId": "dev.misei", | ||
"appName": "Rhene", | ||
"webDir": "www", | ||
"plugins": { | ||
"SplashScreen": { | ||
"launchShowDuration": 0 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
App/build | ||
App/Pods | ||
App/output | ||
App/App/public | ||
DerivedData | ||
xcuserdata | ||
|
||
# Cordova plugins for Capacitor | ||
capacitor-cordova-ios-plugins | ||
|
||
# Generated Config files | ||
App/App/capacitor.config.json | ||
App/App/config.xml |
Oops, something went wrong.