Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gaia-charge/evinfo
Electric vehicle information app for iOS and Android
https://github.com/gaia-charge/evinfo
cordova electric-vehicles odb2 svelte
Last synced: 5 days ago
JSON representation
Electric vehicle information app for iOS and Android
- Host: GitHub
- URL: https://github.com/gaia-charge/evinfo
- Owner: gaia-charge
- License: gpl-3.0
- Created: 2021-08-15T22:12:14.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-06T08:21:33.000Z (almost 2 years ago)
- Last Synced: 2025-01-19T09:34:13.006Z (8 days ago)
- Topics: cordova, electric-vehicles, odb2, svelte
- Language: Svelte
- Homepage:
- Size: 1.32 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Svelte Cordova template
This is a project template for [Svelte](https://svelte.dev) apps running inside cordova apps. It lives at https://github.com/syonip/svelte-cordova-template.
To create a new project based on this template using [degit](https://github.com/Rich-Harris/degit):
```bash
npx degit syonip/svelte-cordova-template svelte-cordova-app
```*Note that you will need to have [Node.js](https://nodejs.org) installed.*
## Get started
Install the dependencies...
```bash
cd svelte-cordova-app
npm install
```## Run local dev server (no cordova)
```bash
npm run dev
```## Add your cordova platform
```bash
cd src-cordova
cordova platform add android/ios
```## Develop on your device with hot reload
Back in the root folder:
```bash
npm run dev-android
```
or
```bash
npm run dev-ios
```This will run the cordova project with a web view pointing to your workstation's IP.
You should see the message `Cordova deviceready fired!` if cordova loaded correctly.
Try to change something in App.svelte, and you should see the content reload in your device.
* You need to have an emulator/device connected to adb
* Your device has to be connected to the same wifi network as your workstation.## To build a prod version:
```bash
npm run build-android
```
or
```bash
npm run build-ios
```## To build the svelte bundle into the src-cordova folder, without actually building the native project
```bash
npm run bundle-android
```
or
```bash
npm run bundle-ios
```## IOS quirks
You need to add a `build.json` file in `src-cordova` folder with your developer id. More info at [cordova docs](https://cordova.apache.org/docs/en/latest/guide/platforms/ios/)