worldskills / worldskills-infrastructure-list

WorldSkills Infrastructure List
3 stars 1 forks source link

WorldSkills Angular App Skeleton

This application skeleton is to be used when creating WS Applications.

It contains a good base for a project and includes many useful components helping you to kickstart your application.

Features

Starting a new project

# Clone a shallow copy of the repository (no history)
$ git clone --depth 1 git@github.com:worldskills/WorldSkills-Angular-Skeleton.git my_application
$ cd my_application

# remove existing git data
$ rm -rf .git

# initialize git for a new project
$ git init

$ npm install
# see bower.json and update version numbers (latest stable for angular libs)
$ bower update

# start the project
$ grunt serve

## Troubleshooting
If you are in windows environnement, you have to install Ruby & Compass
https://rubyinstaller.org/downloads/ => Install ruby with this installer
Install compass => In a fresh terminal `gem install compass`

# to build for distribution
$ grunt build

It is recommended also to rename your application, at the moment it is called 'worldSkillsApp'

angular.module('worldSkillsApp')

It is safe to use global search & replace to rename. There should be 18 references accross the project.

Routing your application

Routing is done with angular-ui-router Routing configuration can be found from app.js

Yeoman

See yeoman instructions on how to create new controllers, views, directives etc.

Yeoman on github

Testing

Karma unit tests Test files under /test/spec

$ grunt test

Protractor E2E testing Test files under /test/protractor

# Start the standalone selenium server
$ ./node_modules/selenium-standalone/bin/start-selenium

# Run tests
$ protractor protractor.conf

Extras

Angular-UI project has many other useful extras that are worth looking into depending on the needs of your project