scripts: Add script to link modules resources

pull/1/head
Guillaume Lesniak 2016-04-13 14:58:41 +02:00
parent 66098962f2
commit 05d1c04ab7
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
#!/bin/bash
if [ ! -d public/js ]; then
mkdir public/js
fi
if [ ! -d public/views ]; then
mkdir public/views
fi
if [ -d node_modules/ng_backoffice ]; then
find node_modules/ng_backoffice/views -name "*.html" -exec ln -s $(realpath {}) public/views/ \;
find node_modules/ng_backoffice/src -name "*.js" -exec ln -s $(realpath {}) public/js/ \;
fi
if [ -d node_modules/ng_client ]; then
find node_modules/ng_client/views -name "*.html" -exec ln -s {} public/views/ \;
find node_modules/ng_client/src -name "*.js" -exec ln -s {} public/js/ \;
fi