kyukyukyu / dash-web

The AngularJS app part of Dash (https://github.com/kyukyukyu/dash).
MIT License
1 stars 0 forks source link

dash-web Build Status Sauce Test Status

The AngularJS app part of Dash

Quickstart

First, clone this repository.

git clone https://github.com/kyukyukyu/dash-web.git
cd dash-web

Then, make sure Bower and Grunt installed. If not, run the following command to install them.

npm install -g bower grunt-cli

Also, make sure Compass installed. This one is needed to compile SASS files.

gem install compass

Next, install dependencies.

npm install && bower install

Now you are ready to play with dash-web!

Testing

dash-web uses Karma as test runner, Jasmine 2.0 as unit testing framework, and Protractor as E2E testing framework. Also, to mock HTTP backends on E2E testing, which should be implemented in Dash, http-backend-proxy is used.

Below is the directory structure for tests.

test/
  e2e/
    page/     # Page Object definitions are here.
    spec/     # E2E testing specs are here.
    util/     # Utilities for E2E testing are here.
    .jshintrc # for E2E testing codes
  mock/       # Fixture data for HTTP backend mocks are here.
  spec/       # Unit testing specs are here.
    common/
    create/
    entity/
  .jshintrc   # for test codes
  karma.conf.js       # Karma configuration
  protractor-e2e.js   # Protractor configuration

To run the tests, just run the following command on the root directory.

grunt test

Serving the App

This app can be served on http://localhost:9000/ with Grunt server. Just run the following command. This will serve the app forever until you terminate the process, and watch the changes on the files so that the browser reloads the page or tests are run immediately.

grunt serve

Build

Run the following command, and the generated files from the build will be located at dist directory.

grunt build

If you want to do jshint, testing, and build at once, just run grunt. If you want to run the server with generate files, run grunt serve:dist.