From 05d1c04ab7aac93e3c639bcc926cac3cff9c7b04 Mon Sep 17 00:00:00 2001 From: Guillaume Lesniak Date: Wed, 13 Apr 2016 14:58:41 +0200 Subject: [PATCH] scripts: Add script to link modules resources --- scripts/link_modules_resources.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 scripts/link_modules_resources.sh diff --git a/scripts/link_modules_resources.sh b/scripts/link_modules_resources.sh new file mode 100755 index 0000000..a27689d --- /dev/null +++ b/scripts/link_modules_resources.sh @@ -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 +