Giter Site home page Giter Site logo

themushrr00m / cordovue Goto Github PK

View Code? Open in Web Editor NEW
69.0 2.0 19.0 2.72 MB

A sample Apache Cordova application using VueJS.

License: MIT License

HTML 1.41% Vue 86.69% JavaScript 8.11% Batchfile 3.79%
webpack cordova vue phonegap vuejs vuejs2 vue-components eslint vuex vue-router

cordovue's Introduction

CordoVue

A simple apache cordova sample project using Vue, Vuex, Vue-router, ESLint and Webpack.

Getting Started

Prerequisites

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

Installation

via Github

$ git clone https://github.com/TheMushrr00m/cordovue.git MyAwesomeApp
$ cd MyAwesomeApp
$ yarn install
$ yarn build
$ yarn android
$ yarn ios

As simple as that!!

Route: '/' Cordovue app

Route: '/#/about' Cordovue app

Please, change MyAwesomeApp with your folder name.
Then, you can open the app in your browser by visiting localhost:8888

What's included

  • yarn dev: Webpack config for source map & hot-reload.
  • yarn build: Production build with HTML/CSS/JS minification.
  • yarn prepare [ ios | android ]: Set the platform. Example (yarn prepare -- android).
  • yarn [ ios | android ]: Run in the iOS simulator / Android emulator. (Running in another terminal). Or physical device.
  • yarn compile [ ios | android ]: Build the app for the specified platform. Example (yarn compile -- ios). (Coming soon).
  • yarn clean: Clean the platforms/ and dist/ folders. (Coming soon)

Tutorials

Presenting Cordovue - Spanish

TO-DO

  • Tests (is it necessary?).

License

MIT. Copyright (c) 2017 Gabriel Cueto <@Mushr00m_Dev>. Modified by @eugenioclrc

Credits

Created with ❤️ in Cancún 😎

cordovue's People

Contributors

eugenioclrc avatar themushrr00m 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cordovue's Issues

SyntaxError: Unexpected keyword 'const'. Const declarations are not supported in strict mode.

Any idea why that error is showing in iOS 9 and 8? I've been trying to figure it out for hours and can't fix it.

My app has been rendering a blank page with that console error, and I just unzipped a fresh download of this repo, with no changes, and see the same thing.

The full error:

VMundefined build.js:31337 SyntaxError: Unexpected keyword 'const'. Const declarations are not supported in strict mode.
    (anonymous function) @ VMundefined build.js:31337

Typescript stuff keeps popping up in my searches, which is weird...

Edit: NVM... I'm also getting this with the webpack-simple template... will update this post with a fix when I find it, for future victims.

Unable to run application for Android

I get the following error message after doing a yarn install and yarn build.

Error: The "path" argument must be of type string. Received type object

Here's the full output:

➜  cordovue git:(master) ✗ yarn android
yarn run v1.7.0
$ cordova run android
Android Studio project detected
ANDROID_HOME=/Users/weboffice/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home
studio
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
        at build_5v7rxzpcy50ml7bi67tb5u0ij.run(/Users/weboffice/git/cordovue/platforms/android/app/build.gradle:143)
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugAidl
:CordovaLib:compileDebugRenderscript
:CordovaLib:checkDebugManifest
:CordovaLib:generateDebugBuildConfig
:CordovaLib:prepareLintJar
:CordovaLib:generateDebugResValues
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources
:CordovaLib:platformAttrExtractor
:CordovaLib:processDebugManifest
:CordovaLib:javaPreCompileDebug
:CordovaLib:processDebugJavaRes NO-SOURCE
:app:preBuild UP-TO-DATE
:app:preDebugBuild
:app:compileDebugAidl
:CordovaLib:packageDebugRenderscript NO-SOURCE
:app:compileDebugRenderscript
:app:checkDebugManifest
:app:generateDebugBuildConfig
:app:prepareLintJar
:app:generateDebugResValues
:app:generateDebugResources
:app:mergeDebugResources
:app:createDebugCompatibleScreenManifests
:app:processDebugManifest
:app:splitsDiscoveryTaskDebug
:app:compileDebugNdk NO-SOURCE
:CordovaLib:mergeDebugShaders
:CordovaLib:compileDebugShaders
:CordovaLib:generateDebugAssets
:CordovaLib:mergeDebugAssets
:app:mergeDebugShaders
:app:compileDebugShaders
:app:generateDebugAssets
:app:mergeDebugAssets
:CordovaLib:compileDebugNdk NO-SOURCE
:CordovaLib:mergeDebugJniLibFolders
:CordovaLib:transformNativeLibsWithMergeJniLibsForDebug
:CordovaLib:transformNativeLibsWithIntermediateJniLibsForDebug
:app:mergeDebugJniLibFolders
:app:processDebugJavaRes NO-SOURCE
:app:validateSigningDebug
:CordovaLib:processDebugResources
:CordovaLib:generateDebugSources
:CordovaLib:compileDebugJavaWithJavacNote: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
:app:processDebugResources
:app:generateDebugSources
:app:javaPreCompileDebug
:app:compileDebugJavaWithJavac
:app:compileDebugSources
:app:transformClassesWithStackFramesFixerForDebug
:app:transformClassesWithDesugarForDebug
:app:transformClassesWithDexBuilderForDebug
:app:transformDexArchiveWithExternalLibsDexMergerForDebug
:app:transformDexArchiveWithDexMergerForDebug
:app:transformNativeLibsWithMergeJniLibsForDebug
:app:transformResourcesWithMergeJavaResForDebug
:app:packageDebug
:app:assembleDebug
:app:cdvBuildDebug

BUILD SUCCESSFUL in 7s
46 actionable tasks: 46 executed
Built the following apk(s):
        /Users/weboffice/git/cordovue/platforms/android/app/build/outputs/apk/debug/app-debug.apk
ANDROID_HOME=/Users/weboffice/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home
No target specified and no devices found, deploying to emulator
No emulator specified, defaulting to Nexus_5X_API_28
Error: The "path" argument must be of type string. Received type object
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

cordova.js isn't found

@TheMushrr00m
In index.html

<script type="text/javascript" src="cordova.js"></script>

But the cordova.js file is in the src folder, so in the browser I get the error message that the file isn't found

Is Vue running after deviceready?

First, awesome job!

But, I'm having a terrible time getting a data adapter running with persistent data. It seems most buggy roads with Cordova lead to whether or not you're running your code after deviceready. But, how you go about insuring that, confuses me... with all the component files and such...

If I'm running some code to start up a database inside the vuex store, is it safe for me to assume it's running after deviceready?

Thanks, hope that question makes sense...

Edit: this illustrates EXACTLY what I'm trying to do, using Loki.js, only that example is with Ionic. It looks like they have $ionicPlatform.ready, but I don't know if there would be any equivalency necessary in this case?

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.