Steven Burrows | a145e10 | 2017-06-16 13:37:50 -0400 | [diff] [blame] | 1 | #!/bin/bash |
Steven Burrows | 0f26ac8 | 2017-08-07 22:36:36 +0100 | [diff] [blame] | 2 | set -e |
Steven Burrows | a145e10 | 2017-06-16 13:37:50 -0400 | [diff] [blame] | 3 | |
| 4 | ONOS_INSTALL_LOCATION=$2 |
| 5 | echo ${ONOS_INSTALL_LOCATION} |
| 6 | |
Steven Burrows | 1c2a968 | 2017-07-14 16:52:46 +0100 | [diff] [blame] | 7 | export NODEJS_HOME=${ONOS_INSTALL_LOCATION} |
Steven Burrows | a145e10 | 2017-06-16 13:37:50 -0400 | [diff] [blame] | 8 | export PATH=$NODEJS_HOME/bin:$PATH |
| 9 | |
| 10 | cd $ONOS_ROOT/tools/gui |
Steven Burrows | a145e10 | 2017-06-16 13:37:50 -0400 | [diff] [blame] | 11 | |
Steven Burrows | 0f26ac8 | 2017-08-07 22:36:36 +0100 | [diff] [blame] | 12 | # Ensure lock file is removed |
Yuta HIGUCHI | cb97b31 | 2017-08-30 10:10:34 -0700 | [diff] [blame^] | 13 | rm -rf node_modules |
Steven Burrows | 0f26ac8 | 2017-08-07 22:36:36 +0100 | [diff] [blame] | 14 | rm -f package-lock.json |
| 15 | |
Steven Burrows | a145e10 | 2017-06-16 13:37:50 -0400 | [diff] [blame] | 16 | # Install Project Dependencies |
| 17 | echo "Installing project dependencies" |
| 18 | npm install --loglevel=error |
Steven Burrows | 0f26ac8 | 2017-08-07 22:36:36 +0100 | [diff] [blame] | 19 | rm -f package-lock.json |
Steven Burrows | a145e10 | 2017-06-16 13:37:50 -0400 | [diff] [blame] | 20 | |
| 21 | # Build the GUI Project |
| 22 | echo "Packaging JavaScript and CSS" |
Yuta HIGUCHI | cb97b31 | 2017-08-30 10:10:34 -0700 | [diff] [blame^] | 23 | npm run build |