7 ROOT_DIR
="$( cd "$
( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
8 SCRIPT_DIR
="$( cd "$
( dirname "${BASH_SOURCE[0]}" )" && pwd )"
14 rm -rf shared
/node_modules modules
/*/node_modules
15 mv node_modules
/ node_modules_temp || true
17 function move_temp_modules_back
{
18 # Move original node_modules back
19 if [[ -d node_modules_temp
]]; then
21 mv node_modules_temp
/ node_modules
/ || true
24 trap move_temp_modules_back EXIT
26 # Remove the old shrinkwrap file
27 rm -f npm-shrinkwrap.json
31 # Install production dependencies
34 # Perform shrinkwrap on production dependencies
37 # Now, override production node_modules
38 move_temp_modules_back