# 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 watch
Starts karma server and all the watch tasks
-
grunt watch:sass
Compiles styles on change to sass files
-
grunt karma:watch:start watch:scripts
Runs tests on changes to js sources. Won't run without karma test server started first
-
grunt watch:livereload
Listens to changes to css and js sources and reloads browser page during development
-
grunt karma:ci
runs 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 watch
andgrunt karma:watch:start watch:scripts
-
grunt css
Builds compass project by running 2 next tasks
-
grunt css:compile
Builds sass and feeds output to autoprefixer
-
grunt css:compress
Feeds css file to csso
-
grunt
,grunt build
builds project into
build
directory. 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.