onos/web/gui/onos-gui-build
Steven Burrows ad0182073e ONOS-7200: Fixed GUI build times
Improved the selectiveness of the source file within the rule
Stopped the bash script from reinstalling NPM depenancies - This was likely left in by mistake when
there were NPM issues when this build step was first introduced

Change-Id: I5364fc8818e37659cdcf11bd19750f0ba1b85a10
2017-11-02 16:51:07 +00:00

23 lines
434 B
Bash
Executable File

#!/bin/bash
set -e
ONOS_INSTALL_LOCATION=$2
echo ${ONOS_INSTALL_LOCATION}
export NODEJS_HOME=${ONOS_INSTALL_LOCATION}
export PATH=$NODEJS_HOME/bin:$PATH
cd $ONOS_ROOT/tools/gui
# Ensure lock file is removed
rm -f package-lock.json
# Install Project Dependencies
echo "Installing project dependencies"
npm install --loglevel=error
rm -f package-lock.json
# Build the GUI Project
echo "Packaging JavaScript and CSS"
npm run build