Skip to content
Snippets Groups Projects
Commit e14323b3 authored by Eric Bremner's avatar Eric Bremner Committed by Liam Morland
Browse files

Fix rebuild script, build option 2

parent 01baaf08
No related branches found
No related tags found
1 merge request!102Fixing the build gesso script to correctly handle build option 2
...@@ -31,65 +31,66 @@ if [ "$?" != 0 ]; then ...@@ -31,65 +31,66 @@ if [ "$?" != 0 ]; then
exit 2; exit 2;
fi fi
if [[ $build_option == 1 || $build_option == 3 ]]; then
if [ -f "gulpfile.js" ]; then
cp gulpfile.js gesso
fi
if [ -f "package.json" ]; then if [ -f "gulpfile.js" ]; then
cp package.json gesso cp gulpfile.js gesso
fi fi
echo "**************************************************************************************" if [ -f "package.json" ]; then
echo "Removing Gesso files ..." cp package.json gesso
rm gesso/gesso.layouts.yml fi
rm gesso/gesso.info.yml
rm gesso/gesso.libraries.yml
rm gesso/gesso.breakpoints.yml
rm gesso/Dockerfile
rm gesso/screenshot.png
rm -rf gesso/templates
echo "Done removing gesso theme files."
echo "**************************************************************************************"
echo ""
echo "**************************************************************************************" echo "**************************************************************************************"
echo "Running npm install ..." echo "Removing Gesso files ..."
cd gesso rm gesso/gesso.layouts.yml
npm install rm gesso/gesso.info.yml
if [ "$?" != 0 ]; then rm gesso/gesso.libraries.yml
echo "Error: npm install failed" rm gesso/gesso.breakpoints.yml
exit 2; rm gesso/Dockerfile
fi rm gesso/screenshot.png
echo "Done npm install." rm -rf gesso/templates
echo "**************************************************************************************" echo "Done removing gesso theme files."
echo "" echo "**************************************************************************************"
echo ""
echo "**************************************************************************************" echo "**************************************************************************************"
echo "Symbolic linking source directory" echo "Running npm install ..."
if [ -d "source" ]; then cd gesso
echo "" npm install
echo "**************************************************************************************" if [ "$?" != 0 ]; then
echo "Removing old source directory ..." echo "Error: npm install failed"
rm -rf source exit 2;
echo "Done removing old source directory." fi
echo "**************************************************************************************" echo "Done npm install."
echo "" echo "**************************************************************************************"
fi echo ""
ln -fs "../source" source
echo "Done symbolic linking source directory."
echo "**************************************************************************************"
echo ""
echo "**************************************************************************************"
echo "Symbolic linking source directory"
if [ -d "source" ]; then
echo ""
echo "**************************************************************************************" echo "**************************************************************************************"
echo "Removing style lint config and replacing with UW config ..." echo "Removing old source directory ..."
rm .stylelintrc.yml rm -rf source
cp ../.stylelintrc.yml . echo "Done removing old source directory."
echo "Done removing style lint config and replacing with UW config."
echo "**************************************************************************************" echo "**************************************************************************************"
echo "" echo ""
fi
ln -fs "../source" source
echo "Done symbolic linking source directory."
echo "**************************************************************************************"
echo ""
echo "**************************************************************************************"
echo "Removing style lint config and replacing with UW config ..."
rm .stylelintrc.yml
cp ../.stylelintrc.yml .
echo "Done removing style lint config and replacing with UW config."
echo "**************************************************************************************"
echo ""
if [[ $build_option == 1 || $build_option == 3 ]]; then
echo "**************************************************************************************" echo "**************************************************************************************"
echo "Running gulp build ..." echo "Running gulp build ..."
gulp build gulp build
...@@ -119,6 +120,19 @@ if [[ $build_option == 1 || $build_option == 3 ]]; then ...@@ -119,6 +120,19 @@ if [[ $build_option == 1 || $build_option == 3 ]]; then
echo "" echo ""
else else
echo "**************************************************************************************"
echo "Compiling CSS and JS ..."
gulp buildStyles
gulp buildScripts
cd ..
rm css/styles.css
rm css/pattern-lab.css
rm css/uw-dashboards.css
echo "Done compiling CSS and JS"
echo "**************************************************************************************"
echo ""
echo "**************************************************************************************" echo "**************************************************************************************"
echo "Setting up gesso helper ..." echo "Setting up gesso helper ..."
mv gesso/gesso_helper . mv gesso/gesso_helper .
......
...@@ -246,6 +246,13 @@ const build = (isProduction = true ) => { ...@@ -246,6 +246,13 @@ const build = (isProduction = true ) => {
parallel(task('bundleScripts'), buildStyles, buildComponentScripts, buildPLStyle, buildPatternLab)); parallel(task('bundleScripts'), buildStyles, buildComponentScripts, buildPLStyle, buildPatternLab));
} }
const buildCSSJS = (isProduction = true ) => {
return series(
parallel(buildStyles, buildComponentScripts));
}
exports.build = build(true); exports.build = build(true);
exports.buildCSSJS = build(true);
exports.default = series(build(false), watchFiles); exports.default = series(build(false), watchFiles);
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