Tutorial on building an angular application.
Clone or download
Pull request Compare This branch is 37 commits ahead, 169 commits behind angular:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
client
config
scripts
server/rpc
test
.gitignore
.nodemonignore
.travis.yml
Makefile
README.md
apls.ls
package.json

README.md

AngularJS Phone Catalog Tutorial Application, in LiveScript with SocketStream 0.3.2

Build Status

Motivation

  • use SocketStream
  • make AngularJS unit and E2E Tests work (refer to this thread)
  • include unit test coverage report
  • use LiveScript, LESS and Jade

Install

Run

$./scripts/install.sh

besides

npm install

it also globally install some npm binaries needed, e.g.

npm -g install testacular@0.5.6

to supports test spec files in LiveScript

Start Server

$./scripts/web-server.sh

server listen on http://localhost:4000/app

Unit Test

Mocha in browser

http://localhost:4000/test/client

Mocha with PhantomJS from CLI

$./scripts/test.sh 

Jasmine with Testacular (not optimal)

use SS_PACK=1 and load the minified js in client/static/assets, in which SS style 'require' is defined:

$./scripts/test-jasmine.sh 

will run

./scripts/pack.sh

first to only pack files (not launch server)

Unit Test Coverage Report

First have the web server running

$./scripts/web-server.sh

then

$make test-cov

and then visit the html coverage report at http://localhost:4000/coverage.html

note the node-jscoverage instrumented version of mocha test in browser is at http://localhost:4000/test/client/cov

json2htmlcov is used to render the output of

mocha-phantomjs -R json-cov http://localhost:4000/test/client/cov

E2E Test

Browser

url http://localhost:4000/test/e2e/runner.html

Testacular

$./scripts/e2e-test.sh