Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 1 | #!/bin/sh |
2 | |||||
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 3 | |
4 | |||||
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 5 | ### Set the node environment. |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 6 | NODE_VERSION="v6.10.0" |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 7 | |
8 | |||||
9 | |||||
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 10 | ### Set the NVM root dir |
11 | NVM_DIR=/home/${USER}/.nvm | ||||
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 12 | |
13 | |||||
14 | |||||
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 15 | echo "Set the node environment." |
16 | . "${NVM_DIR}/nvm.sh" | ||||
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 17 | echo "OK." |
18 | echo "" | ||||
19 | |||||
20 | |||||
21 | |||||
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 22 | ### Add newer c++ compiler. |
23 | if [ -f /opt/rh/devtoolset-4/enable ]; then | ||||
24 | . /opt/rh/devtoolset-4/enable | ||||
25 | fi | ||||
26 | |||||
27 | |||||
28 | |||||
29 | ### Set the node version manager version. | ||||
30 | echo "Set the node version manager version." | ||||
31 | nvm use ${NODE_VERSION} | ||||
32 | echo "OK." | ||||
33 | echo "" | ||||
34 | |||||
35 | |||||
36 | |||||
37 | ### Run the Node package manager (NPM). | ||||
38 | echo "Run the Node package manager (NPM)." | ||||
39 | npm install | ||||
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 40 | echo "OK." |
41 | echo "" | ||||
42 | |||||
43 | |||||
44 | |||||
45 | ### Build the application. | ||||
46 | echo "Build the application." | ||||
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 47 | npm run build:prod |
48 | echo "OK." | ||||
49 | echo "" | ||||
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 50 |