angular-requireJS

Sample page: http://the-unsoul.github.io/angular-requireJS/#/home

note: pages which using JSON API won't work with github-pages. The sample only for demonstrate loading speed and on-demand loading (dependencies injection)

A seed project for angular and requireJS using AngularAMD

Author: UnS
Author's email: duylinh20032003@yahoo.com
Company: Elinext
State: (Offical)

Installation:

Install application dependencies:

cd to project directory run:

npm install

End to end (e2e) protractor settup

require [Selenium Server] running along with JDK. Check out server-setup

npm install -g protractor

Start up localhost and json

Start node server then start fake API for the project

npm start
npm run json

Enable dev modes on Chrome for Service worker (NOTE: --ignore-certificate-errors is reuiqred)

// windows
start chrome --user-data-dir=/tmp/foo --ignore-certificate-errors --unsafely-treat-insecure-origin-as-secure=http://locahost:3030 

// ubuntu
google-chrome --user-data-dir=/tmp/foo --ignore-certificate-errors --unsafely-treat-insecure-origin-as-secure=http://locahost:3030

access sample project seed at development state with http://localhost:3030/

Testing

running both unit testing with e2e testing

webdriver-manager start
grunt test

unit testing with karma + Jasmine

grunt unit

e2e testing with protractor + Jasmine

grunt e2e

Deploy

grunt build

The deployed website will be found at public/ folder. To access the deployed website with server environment use

npm run public

Then access it through the link http://localhost:3031/