Skip to content

jperl/angular-jquery-mobile

Repository files navigation

About

Build Status

This project shows how to use angular with jquery mobile to build structured and tested cross platform HTML5 single page applications!

The main frameworks are angular, jquery mobile, and most importantly the adapter.

The grunt workflow

  • watches code for any changes and reloads the page
  • compiles less into a css file
  • lints your code against JSHint rules
  • preprocesses an indexTemplate and builds the index.html so
    • jquery mobile pages can be seperated and inserted into the index page
    • angular templates can be seperated, processed, and inserted into the index page
    • development mocks can be inserted
  • builds and minifies your code
  • runs unit and E2E tests with karma

Getting Started

Need to have node, bower (sudo npm install -g bower), karma (sudo npm install -g karma), and grunt (npm install -g grunt-cli) installed.

Clone git clone git@github.com:jperl/angular-jquery-mobile.git

Install node and bower packages

sudo npm install && sudo bower install --dev

Run the server with grunt server and open the application here (localhost:9000/app/index.html).

Testing

All testing is ran on karma.

Unit tests use Jasmine.

Acceptance / E2E tests use cucumber. Learn more about gherkin writing style here.

Strategy

Type Test Type Example
Service Unit Test example
Directive Unit Test example
Acceptance / E2E Cucumber Feature Test feature, step definition

#####**Until the karma adapter is complete you can only run cucumber tests manually

#####Run (unit) tests once grunt ci

#####Run (unit) tests on other browsers

Run the server in one terminal and run the tests in another terminal with karma run.

Test Type Server
Unit Tests grunt server:testUnit
Cucumber Tests Coming Soon

Point as many browsers that you want to test (mobile devices, other computers) to the karma server url.

#####Manually run tests

Test Type Run Them
Unit Tests grunt server:test then in the unit karma window choose debug at the top
Acceptance / Cucumber Tests grunt server then open the runner

Build

grunt build

Serve it grunt server and open it here (localhost:9000/dist/index.html)

License

MIT License

About

A todo example with angular, jquery mobile, and tested with karma & travis. Explanation video here http://youtu.be/hNAHogdcus0

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published