/transparence

Giving up on opacity since 1976.

Primary LanguageJavaScript

Transparence Build Status Code Climate Code Climate

Stories in Ready Stories In Progress

A tool to help with bonus calculation in a visual and easy way.

Modules

Install

First, to install the global dependencies, just do the following:

$ npm install -g grunt grunt-cli bower

Then, in the cloned local repository directory:

[... transparence ]$ bower install
[... transparence ]$ npm install

Update

You must do both:

[... transparence ]$ bower list
[... transparence ]$ npm-check-updates

Beware though, as npm-check-updates tends to downgrade karma-jasmine to 1.5, which will break the application.

Build

Default build chain:

[... transparence ]$ NODE_ENV=development grunt

Available tasks are:

  • clean[:after, :all, :package]
  • jshint[:all]
  • concat[:all]
  • uglify[:all]
  • less[:development, :production]
  • preprocess[:index]
  • copy[:templates, :development, :production]
  • karma[:unit]
  • shell[:package]

Main tasks are:

  • compile: development oriented compiling
  • clean:all, clean:package, jshint, concat, less:development, preprocess:index, copy:templates, copy:development
  • test: development oriented compiling and testing
  • compile, karma:unit
  • prepare: production oriented compiling
  • clean:all, clean:package, jshint, concat, uglify, less:production, preprocess:index, copy:templates, copy:production, clean:after
  • confirm: production oriented compiling and testing
  • prepare, karma:unit
  • package: which does prepare and confirm plus project packaging
  • confirm, shell:package

Main chains are:

[... transparence ]$ NODE_ENV=development grunt test
[... transparence ]$ NODE_ENV=production grunt package

Don't forget to set NODE_ENV to either development or production.

Testing

You can start Karma's file watch this way:

$ npm install -g karma
[... transparence ]$ karma start

Alternatively, you can use the provided grunt task, which does a single run:

[... transparence ]$ grunt test

Launching

You can start a server by the following grunt task:

[... transparence ]$ grunt connect

This will execute all the build tasks, then start a server on port 3000 with the content of directory dist.

Finally, the best way to compile, test and connect in development mode is the following:

[... transparence ]$ NODE_ENV=development grunt test && grunt connect