# get npm dependencies
npm install
# install global npm dependencies
npm -g install grunt-cli
npm -g install bower
npm -g install karma
# also to be able to run tests from cli
# without browser window popping
# consider to install PhantomJS
http://phantomjs.org/download.html
# get ruby dependencies required to compile styles from sass
bundle install
To make development faster and more automated there are several grunt tasks available:
-
grunt karma:watch:start watchStarts karma server and all the watch tasks
-
grunt watch:sassCompiles styles on change to sass files
-
grunt karma:watch:start watch:scriptsRuns tests on changes to js sources. Won't run without karma test server started first
-
grunt watch:livereloadListens to changes to css and js sources and reloads browser page during development
-
grunt karma:ciruns tests against build (which should be run first), is good to use in CI scenarios as quits after single run
-
see
grunt karma:watch:start watchandgrunt karma:watch:start watch:scripts
-
grunt cssBuilds compass project by running 2 next tasks
-
grunt css:compileBuilds sass and feeds output to autoprefixer
-
grunt css:compressFeeds css file to csso
-
bumpVersionWorks with gitglow releases. E.g. when you're on
release/0.4.4branch it will update cache beaters to follow version.
-
grunt,grunt buildbuilds project into
builddirectory. Under the hood compiles and compresses css, compiles (with requirejs) and uglifies.
To update all the dependencies to latest compatible versions run bower install.
Tests use Jasmin for assertions.
Protractor is used to provide way to do e2e tests. To install cd to client folder and run:
npm install -g protractor
// This installs selenium standalone server and chromedriver to ./selenium
./node_modules/protractor/bin/install_selenium_standalone
// Start the server with
./selenium/start
// to run tests
protractor p.conf.js
So far e2e tests are intended to be run against domain that is set in config of protractor task in Grunfile. Later on environment config will be applied.
Checkout Protractor docs for more information.