MonarcAppBO/scripts/link_modules_resources.sh

45 lines
1.4 KiB
Bash
Raw Normal View History

#!/bin/bash
# Ensure folders are existing
if [ ! -d public/js ]; then
mkdir public/js
fi
2016-04-22 15:51:07 +02:00
if [ ! -d public/css ]; then
mkdir public/css
fi
if [ ! -d public/views ]; then
mkdir -p public/views/dialogs
fi
2016-04-13 17:03:50 +02:00
if [ ! -d public/img ]; then
mkdir public/img
fi
# Link modules resources
if [ -d node_modules/ng_backoffice ]; then
cd public/views/ && find ../../node_modules/ng_backoffice/views -maxdepth 1 -name "*.html" -exec ln -s {} \; 2>/dev/null
cd dialogs/ && find ../../../node_modules/ng_backoffice/views/dialogs -maxdepth 1 -name "*.html" -exec ln -s {} \; 2>/dev/null
cd ../../js/ && find ../../node_modules/ng_backoffice/src -maxdepth 1 -name "*" -exec ln -s {} \; 2>/dev/null
2016-06-29 11:46:42 +02:00
cd ../css/ && find ../../node_modules/ng_backoffice/css -name "*" -exec ln -s {} \; 2>/dev/null
cd ../img/ && find ../../node_modules/ng_backoffice/img -name "*" -exec ln -s {} \; 2>/dev/null
cd ../..
2016-04-13 17:03:50 +02:00
pushd node_modules/ng_backoffice
grunt concat
popd
fi
if [ -d node_modules/ng_client ]; then
cd public/views/ && find ../../node_modules/ng_client/views -name "*.html" -exec ln -s {} \; 2>/dev/null
cd ../js/ && find node_modules/ng_client/src -name "*.js" -exec ln -s {} \; 2>/dev/null
cd ../css/ && find node_modules/ng_client/css -name "*.css" -exec ln -s {} \; 2>/dev/null
cd ../img/ && find node_modules/ng_client/img -name "*" -exec ln -s {} \; 2>/dev/null
cd ../..
2016-04-13 17:03:50 +02:00
2016-06-29 11:46:42 +02:00
pushd node_modules/ng_client
2016-04-13 17:03:50 +02:00
grunt concat
popd
fi