To develop, test and build you need Node.js and npm to install JS dependencies. For example, for Ubuntu:
sudo add-apt-repository ppa:chris-lea/node.js
sudo add-apt-repository ppa:gias-kay-lee/npm
sudo apt-get update
sudo apt-get install nodejs npm
Next to install NPM dependencies run in project dir:
npm install
To build CSS styles for widget you need Compass. For example, for Ubuntu:
sudo apt-get install ruby1.9.1 ruby1.9.1-dev
sudo gem1.9.1 install compass --no-user-install --bindir /usr/bin
There are 2 types of tests for widgets:
- Unit tests. To run it just call
./node_modules/.bin/cake testin project dir and open http://localhost:8124/ in browser. - Integration tests. To run it just call
./node_modules/.bin/cake watchin project dir and test HTML in browser.
To build production ready JS files of widgets just call in project dir:
./node_modules/.bin/cake build