Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nanogiants/cordova-plugin-hot-reload
https://github.com/nanogiants/cordova-plugin-hot-reload
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/nanogiants/cordova-plugin-hot-reload
- Owner: nanogiants
- Created: 2019-08-09T14:58:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-06-23T19:42:46.000Z (over 1 year ago)
- Last Synced: 2024-10-01T19:21:36.015Z (about 2 months ago)
- Language: JavaScript
- Size: 22.5 KB
- Stars: 11
- Watchers: 7
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cordova-plugin-hot-reload
This plugin enables you to develop cordova apps with hot-reloading in your app in your development environment.
It creates two hooks that modify your config.xml and point the content to the local development server when you serve the app and point to the `index.html` file when you build your app.### Installation
```
cordova plugin add @appcominteractive/cordova-plugin-hot-reload
```### Cordova files
The files are served via symlinks from your public folder and pointing to the correct platform files.
Remember to keep your symlinks out of git and add them to your `.gitignore` file.### preparation
```
npm i concurrently wait-on cross-env
```To serve your frontend files you could start your app like so
```
"serve:android": "cross-env PORT=8080 concurrently \"npm run serve\" \"wait-on http://localhost:8080 && cordova run android\""
```you _have_ to set the `PORT` environment, so the plugin can point to the correct port.
### Variables
You can add variables to the plugin by adding the following to your `config.xml` in the `widget` tag:
```xml
```
Now all symlinks get set to your folder named `www`. The path must be relative to your `config.xml`