-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from sts-ryan-holton/dev
Update Nuxt JS and Vuetify, update Cordova and README.md
- Loading branch information
Showing
552 changed files
with
3,927 additions
and
53,006 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 |
---|---|---|
|
@@ -83,3 +83,9 @@ dist | |
|
||
# Service worker | ||
sw.* | ||
|
||
# Cordova | ||
cordova/platforms | ||
cordova/plugins | ||
cordova/www | ||
nuxtfiles |
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 |
---|---|---|
@@ -1,67 +1,54 @@ | ||
# :iphone: Nuxt JS + Vuetify 2 SPA hybrid app template | ||
|
||
**:warning: Please use this repo as a template, Android hasn't been fully tested for this repo.** | ||
|
||
[Nuxt JS](https://nuxtjs.org/) (Vue JS) + [Vuetify 2](https://vuetifyjs.com/en/) SPA hybrid demo app built using [Apache Cordova](https://cordova.apache.org/), formally known as PhoneGap. | ||
|
||
## :scroll: Requirements | ||
Use this template to get you up and running with a Nuxt JS + Vuetify and Cordova project. | ||
|
||
- Node JS, NPM _(latest versions)_ | ||
- Xcode installed with Apple ID linked up _(for iOS development)_ | ||
- Cordova installed globally | ||
## :rocket: Project Setup | ||
|
||
## :wrench: Local Development | ||
#### Requirements | ||
|
||
### Browser | ||
- Cordova `= 8.0.0` | ||
- Xcode `>= 10.3` | ||
- Android Studio `>= 3.4` | ||
- Node JS `>= 10.13.0` | ||
- NPM `>= 6.10.0` | ||
|
||
From the **main project folder:** | ||
#### Installation | ||
|
||
``` bash | ||
# install dependencies | ||
$ npm install | ||
|
||
# serve with hot reload at localhost:3000 | ||
$ npm run dev | ||
# navigate to the cordova/ directory | ||
$ cd cordova && cordova prepare | ||
|
||
# Install required packages to run emulator | ||
$ cd cordova/platforms/ios/cordova && npm install ios-sim ios-deploy | ||
``` | ||
|
||
### iOS/Android Simulation | ||
**Note: if `cordova prepare` fails, check that the cordova/www directory exists, if it doesn't create it.** | ||
|
||
> Run all installation commands from the root project. | ||
From within the **cordova folder:** | ||
|
||
## :wrench: Local Development | ||
|
||
``` bash | ||
# install dependencies | ||
$ npm install | ||
|
||
# serve with hot reload at localhost:3000 | ||
$ npm run dev | ||
``` | ||
**:warning:** certain native plugins and functionality are only available on an emulator/physical device, ignore any console warnings/errors associated to these. | ||
|
||
You should be able to run: `npm run cordova-ios` from the main project root folder which will compile, build and launch a simulation on the device specified within the *package.json* file _(default: iPhone 8, iOS 12.2)_. | ||
|
||
Run: `npm run cordova-android` to run on a simulated Android environment. | ||
|
||
|
||
## :rocket: Production/Deployment | ||
|
||
### iOS | ||
|
||
Some configuration will be required before you can build your app, this will include: adding your Apple ID and setting a few settings. | ||
|
||
To build the app for your iPhone, connect your iPhone to you Mac, launch Xcode, and open the `cordova/platforms/ios/demoApp.xcodeproj` file, from here click the *Play/Run* button at the top of Xcode. | ||
|
||
### Android | ||
|
||
You should be able to open the relevant file within `cordova/platforms/android/...` | ||
|
||
### Browser | ||
## :iphone: Build Apps | ||
|
||
``` bash | ||
# build for production | ||
$ npm run build | ||
|
||
# generate static project in production mode on http://localhost:3000/ | ||
$ npm run start | ||
# build, compile and launch on simulator | ||
$ npm run cordova-ios | ||
|
||
# build, compile and launch on simulator | ||
$ npm run cordova-android | ||
``` | ||
|
||
## :rotating_light: Notes | ||
|
||
- Trying to run `npm run cordova-*` with your phone connected may not launch the simulation until you disconnect your device. |
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 @@ | ||
export default function (to, from, savedPosition) { | ||
return new Promise(resolve => { | ||
window.$nuxt.$once('triggerScroll', () => { | ||
resolve({ x: 0, y: 0 }) | ||
}) | ||
}) | ||
} |
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.