Skip to content
Snippets Groups Projects
Commit e87c749f authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-5509: updating build ohana for non theme development

parent e3444441
No related branches found
No related tags found
No related merge requests found
...@@ -47,11 +47,9 @@ echo "Done installing correct npm version." ...@@ -47,11 +47,9 @@ echo "Done installing correct npm version."
if [[ $build_option == 1 || $build_option == 3 ]]; then if [[ $build_option == 1 || $build_option == 3 ]]; then
echo "**************************************************************************************" echo "**************************************************************************************"
echo "Setting up theming ..." echo "Setting up theming ..."
if [[ $build_option == 1 || $build_option == 3 ]]; then ln -s "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/ohana/dist "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/dist
ln -s "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/ohana/dist "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/dist rm -rf src/patterns
rm -rf src/patterns ln -s ../../src/patterns src/patterns
ln -s ../../src/patterns src/patterns
fi
echo "**************************************************************************************" echo "**************************************************************************************"
echo "Done setting up theming." echo "Done setting up theming."
fi fi
...@@ -71,14 +69,25 @@ npm run build ...@@ -71,14 +69,25 @@ npm run build
echo "**************************************************************************************" echo "**************************************************************************************"
echo "Done running npm run build." echo "Done running npm run build."
if [[ $build_option != 1 && $build_option != 3 ]]; then if [[ $build_option == 2 || $build_option == 4 ]]; then
echo "**************************************************************************************" echo "**************************************************************************************"
echo "Setting up css/js and removing ohana ..." echo "Setting up css/js and removing ohana ..."
mv "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/ohana/dist "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/ cd ..
cd "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/ohana/dist/css if [[ ! -d ohana ]]; then
rm !("all.min.css") mkdir dist
cd "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/ohana/dist/js fi
rm !("all.min.js") cp -r ohana/dist/* dist
cd dist/css
find . -type f -not -name 'all.min.css' -delete
cd ../js
find . -type f -not -name 'all.min.js' -delete
cd ..
if [[ -d vendor ]]; then
rm -rf vendor
fi
if [[ -d dist ]]; then
rm -rf dist
fi
cd "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/ cd "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/
rm -rf ohana rm -rf ohana
echo "**************************************************************************************" echo "**************************************************************************************"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment