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
exit 2;
fi
if [[ $build_option == 1 || $build_option == 3 ]]; then
if [ -f "gulpfile.js" ]; then
cp gulpfile.js gesso
fi
if [ -f "package.json" ]; then
cp package.json gesso
fi
if [ -f "gulpfile.js" ]; then
cp gulpfile.js gesso
fi
echo "**************************************************************************************"
echo "Removing Gesso files ..."
rm gesso/gesso.layouts.yml
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 ""
if [ -f "package.json" ]; then
cp package.json gesso
fi
echo "**************************************************************************************"
echo "Running npm install ..."
cd gesso
npm install
if [ "$?" != 0 ]; then
echo "Error: npm install failed"
exit 2;
fi
echo "Done npm install."
echo "**************************************************************************************"
echo ""
echo "**************************************************************************************"
echo "Removing Gesso files ..."
rm gesso/gesso.layouts.yml
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 "Symbolic linking source directory"
if [ -d "source" ]; then
echo ""
echo "**************************************************************************************"
echo "Removing old source directory ..."
rm -rf source
echo "Done removing old source directory."
echo "**************************************************************************************"
echo ""
fi
ln -fs "../source" source
echo "Done symbolic linking source directory."
echo "**************************************************************************************"
echo ""
echo "**************************************************************************************"
echo "Running npm install ..."
cd gesso
npm install
if [ "$?" != 0 ]; then
echo "Error: npm install failed"
exit 2;
fi
echo "Done npm install."
echo "**************************************************************************************"
echo ""
echo "**************************************************************************************"
echo "Symbolic linking source directory"
if [ -d "source" ]; then
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 "Removing old source directory ..."
rm -rf source
echo "Done removing old source directory."
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 "Running gulp build ..."
gulp build
......@@ -119,6 +120,19 @@ if [[ $build_option == 1 || $build_option == 3 ]]; then
echo ""
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 "Setting up gesso helper ..."
mv gesso/gesso_helper .
......
......@@ -246,6 +246,13 @@ const build = (isProduction = true ) => {
parallel(task('bundleScripts'), buildStyles, buildComponentScripts, buildPLStyle, buildPatternLab));
}
const buildCSSJS = (isProduction = true ) => {
return series(
parallel(buildStyles, buildComponentScripts));
}
exports.build = build(true);
exports.buildCSSJS = build(true);
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