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."
if [[ $build_option == 1 || $build_option == 3 ]]; then
echo "**************************************************************************************"
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
rm -rf src/patterns
ln -s ../../src/patterns src/patterns
fi
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
ln -s ../../src/patterns src/patterns
echo "**************************************************************************************"
echo "Done setting up theming."
fi
......@@ -71,14 +69,25 @@ npm run build
echo "**************************************************************************************"
echo "Done running npm run build."
if [[ $build_option != 1 && $build_option != 3 ]]; then
if [[ $build_option == 2 || $build_option == 4 ]]; then
echo "**************************************************************************************"
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 "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/ohana/dist/css
rm !("all.min.css")
cd "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/ohana/dist/js
rm !("all.min.js")
cd ..
if [[ ! -d ohana ]]; then
mkdir dist
fi
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/
rm -rf ohana
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