Coder Social home page Coder Social logo

phonegap / phonegap-template-vue-f7-blank Goto Github PK

View Code? Open in Web Editor NEW
33.0 17.0 14.0 11.77 MB

A blank PhoneGap template using Vue.js and Framework7

License: Apache License 2.0

JavaScript 66.75% HTML 8.92% Vue 12.61% CSS 11.72%
phonegap phonegap-templates vuejs2 framework7 framework7-vue webpack cordova vue

phonegap-template-vue-f7-blank's Introduction

A Blank PhoneGap template using Vue.js and Framework7

Vue.js, Framework7, and Cordova / PhoneGap Template with Babel, Webpack and Hot Reloading

example image

Getting Started

Prerequisites

To use this template, you'll need Node.js v6 or newer.

Installation

To use this as a template, use Cordova 6.0.0+ and create a new project:

cordova create MyAppName --template=phonegap-template-vue-f7-blank

or

phonegap create MyAppName --template phonegap-template-vue-f7-blank

then

cd MyAppName
npm install

Run the app in the browser / simulator

Run this to start the development webpack server:

npm run dev

You can then open the app in your browser by visiting localhost:8080

Open it in the iOS Simulator by running (in another terminal):

cordova platform add ios or phonegap platform add ios

then

npm run cordova-run-ios

Or in the Android emulator with:

cordova platform add android or phonegap platform add android

then

npm run cordova-run-android

(both of which are just calling cordova run ios and cordova run android)

Build the app for production

To build the app without the development hot module reloading server:

npm run build-prod

After that, the normal Cordova / PhoneGap commands can be used such as phonegap serve, or cordova run ios, etc.

phonegap-template-vue-f7-blank's People

Contributors

devgeeks avatar hermwong avatar hollyschinsky avatar jcesarmobile avatar macdonst avatar surajpindoria avatar timkim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phonegap-template-vue-f7-blank's Issues

Add PWA features to template

Ran Lighthouse against an app created with this template and it scored:

screenshot 2017-05-29 15 13 59

This issue is to track the improvement of the template adding PWA functionality.

Wrong source path for static assets ?

Hello!

I think the line

cp('-R', 'static/*', assetsPath);

should change to

cp('-R', 'src/static/*', assetsPath);

In order to copy the static folder from the src dir to the www dir. Is that what is intended?

How to use this project in Android Studio

Hi,
Is there instructions for how to use this project template within Android Studio (based on intelliJ)?
I tried creating a new project using existing sources but it didn't work and there were errors. I will post them shortly, but if there are instructions already, I should try that first.

thank you

Move index.html into ./src

To avoid confusion, we should move the index.html file that is used to build the final index.html from the root of the project to the src folder. This file is a src file in that it is the one that can be edited, then is used to generate the one in the www folder for use in Cordova.

Use Node 6

Let's just force Node 6 so we can use ES2015 style JS.

Project Does not run per instructions

When running $ npm run dev

Numerous errors appear. In particular.

ERROR in ./src/main.js
Module not found: Error: Can't resolve './app' in '/home/darren/WebstormProjects/CordovaApps/TestApp/src'
@ ./src/main.js 16:0-24 25:9-12
@ multi (webpack)-dev-server/client?http://localhost:8080 (webpack)/hot/dev-server.js ./src/main.js

Three/Four finger tap not working

It appears in this and the other templates:

  • phonegap-template-vue-f7-tabs
  • phonegap-template-vue-f7-split-panel

The three/four finger tap doesn't work in the PhoneGap Developer App. Seems like framework or something else is intercepting the calls.

Support css url(/static/img/stuff.png)

In a recent project, I had a CSS rule (In the <style> section of a .vue file) that used background-image: url(/static/image.png).

This worked fine in DEV mode, but building and deploying to android (or double-clicking the www/index.html file) resulted in the image resolving to a 404.
Changing the css rule on-the-fly to remove the leading slash (url(static/image.png) made the image load. But removing the slash in the SOURCE make the build fail (MiniCssExtractPlugin threw "unable to resolve" errors).

My workaround is to REMOVE that rule from the <style> section of the file and inject it dynamically in mounted() as url(static/image.png). Thankfully I only have one background image I'm setting this way.

I'm reporting this here, as I think people using this template would expect url() to work with /static/ resources in their <style> section.

Thanks for all your hard work!

Turn off quote stripping in HTML minify

Related to this issue, I was having problems testing my app in the phonegap app, since it did not refresh automatically. The fix for me was to have the <script type="text/javascript" src="cordova.js"></script> as the last script in the document (it is strange).

As a fix for this I had to:

<% for (var chunk in htmlWebpackPlugin.files.chunks) { %>
<script type="text/javascript" src="<%= htmlWebpackPlugin.files.chunks[chunk].entry %>"></script>
<% } %>
<script type="text/javascript" src="cordova.js"></script>

I can submit a PR with these changes if required :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.