Angular

Prepare your environment

You only need to do this once, when installing your machine. You’ll need to have NodeJS >= v4.x. See https://github.com/nodesource/distributions You will also need to have npm >= 2.x. You can run ‘npm install -g npm’ to update it.

$> mkdir ~/.node_modules_global
$> npm config set prefix $HOME/.node_modules_global
$> npm install -g npm
$> npm install -g bower grunt-cli

Then add the following lines to your ‘.bashrc’ file to add the newly created ‘node_modules_global’ folder to your PATH:

export NPM_GLOBAL_HOME=~/.node_modules_global/bin
export PATH=$NPM_GLOBAL_HOME:$PATH

To turn off the progress notification when you do ‘npm install’:

$> npm config set progress false

Install

$> cd /my/tuleap/sources/plugins/agiledashboard/www/js/[kanban|planning-v2]/
$> npm install
$> bower install

Compile

$> cd /my/tuleap/sources/plugins/agiledashboard/www/js/[kanban|planning-v2]/
$> npm run build
# or
$> npm run watch

Tests and test coverage

$> cd /my/tuleap/sources/plugins/agiledashboard/www/js/[kanban|planning-v2]/
$> npm run test
# To see what parts of your code are covered by tests:
$> npm run coverage

Working on artifact-modal

Clone the artifact-modal repository (tuleap/artifact-modal project on gerrit)

$> cd /my/artifact-modal/sources/
$> npm install
$> bower install

Then, we’ll make a symbolic link in the modal’s parent application:

$> cd /my/tuleap/sources/plugins/agiledashboard/www/js/[kanban|planning-v2]/
# If you already had installed the modal using bower, we'll need to remove it
$> rm -rf vendor/artifact-modal/
$> ln -s /my/artifact-modal/sources/ vendor/artifact-modal

Every time you change something, you’ll have to run ‘npm run build’ in the artifact-modal and in the parent application (in that order):

$> (cd /my/artifact-modal/sources/ && npm run build) && \
(cd /my/tuleap/sources/plugins/agiledashboard/www/js/[kanban|planning-v2]/ && npm run build)