Commit 2184c082 authored by Liam Morland's avatar Liam Morland
Browse files

Merge branch '3.0.x-rebuild' into '3.0.x'

Fixing the build gesso script to correctly handle build option 2

See merge request !102
parents 01baaf08 5cfe3f57
......@@ -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);
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment