Git Product home page Git Product logo

phonegap-scaffold's Introduction

This is a scaffold for building phonegap application

Phonegap is a tool to let developer build cross platform native mobile applciations using js/html/css. However, for morden web/UI developers, raw css/js/html are not preferable. We'd like to use scss/coffeescript/haml which are more efficient.

Searching sometime, I haven't found any mature solutions yet, So I create this repo to let developers start building phonegap using morden tech as fast as possiable.

It can

  • detect your changes and compile it at the same time
  • integrate jasmine as js test
  • help to ajust style in brower and deploy it automatically to simulator

Prepare

  • Of course, you need to download phonegap package first.
  • If you want to build ios, make sure you have Xcode installed - with command line tools.
  • If you want to build android, make sure you have latest android SDK installed. Set ANDROID_HOME in your environment and adb/android can be found in command line.
  • Install qt to run jasmine:headless. brew install qt

How to use(Take IOS for example)

  • Open index.html in ios simulator. The following commands will open ios simulator and show index.html.

    Please replace PHONEGAP_PATH with your own path

    git clone [email protected]:warmwind/phonegap-scaffold.git
    PHONEGAP_PATH/lib/ios/bin/create phonegap-scaffold/platform/ios package_name phonegap
    cd phonegap-scaffold
    bundle
    rake set_env
    rake compile_all
    rake ios:run
  • Open index.html in browser

    git clone [email protected]:warmwind/phonegap-scaffold.git
    cd phonegap-scaffold
    bundle
    rake set_env
    rake compile_all
    open www/index.html

Development

Auto Compile

Run guard to auto compile coffee, scss, haml

guard

Different Environment

Maybe you are responable to build backend api as well as mobile, and your api has different urls for deveolopment, uat and production. Run the following task to set env for phonegap application

rake set_env[http://uat.com]

Coding

  • edit code under www/

  • rake -T to see available tasks. Frequent tasks might be:

    rake ios:build         # run platform/ios/cordova/build
    rake ios:run           # run platform/ios/cordova/run
    rake android:build     # run platform/android/cordova/build
    rake android:run       # run platform/android/cordova/run
    rake jasmine:headless  # Run Jasmine specs headlessly

phonegap-scaffold's People

Contributors

warmwind avatar

Watchers

cfen avatar James Cloos avatar

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.