Skip to content

Commit

Permalink
Merge pull request #1 from sts-ryan-holton/dev
Browse files Browse the repository at this point in the history
Update Nuxt JS and Vuetify, update Cordova and README.md
  • Loading branch information
sts-ryan-holton authored Sep 1, 2019
2 parents 19c9c0b + 2f43e19 commit 1335391
Show file tree
Hide file tree
Showing 552 changed files with 3,927 additions and 53,006 deletions.
Binary file modified .DS_Store
Binary file not shown.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,9 @@ dist

# Service worker
sw.*

# Cordova
cordova/platforms
cordova/plugins
cordova/www
nuxtfiles
67 changes: 27 additions & 40 deletions README.md
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.
7 changes: 7 additions & 0 deletions app/router.scrollBehavior.js
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 modified cordova/.DS_Store
Binary file not shown.
Binary file removed cordova/platforms/.DS_Store
Binary file not shown.
14 changes: 0 additions & 14 deletions cordova/platforms/android/.gitignore

This file was deleted.

23 changes: 0 additions & 23 deletions cordova/platforms/android/CordovaLib/AndroidManifest.xml

This file was deleted.

137 changes: 0 additions & 137 deletions cordova/platforms/android/CordovaLib/build.gradle

This file was deleted.

Loading

0 comments on commit 1335391

Please sign in to comment.