From ec52ef67db681dca367fd96a9e318b26395a7ad4 Mon Sep 17 00:00:00 2001 From: Mikey <46366395+mikikiv@users.noreply.github.com> Date: Thu, 27 Jul 2023 21:56:18 -0700 Subject: [PATCH] update build method to include export option --- extensionReqs/build.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/extensionReqs/build.sh b/extensionReqs/build.sh index da07796..53cf7b1 100755 --- a/extensionReqs/build.sh +++ b/extensionReqs/build.sh @@ -2,11 +2,15 @@ # Build the Next.js application npx next build -echo "\n Build complete \n " +echo " +Build complete +" # Export the application as static HTML files npx next export -echo "\n Export complete \n " +echo " +Export complete +" # Move the _next directory to next @@ -28,3 +32,11 @@ cp extensionReqs/manifest.json extension/manifest.json # Remove the out directory rm -rf out + +# when the user includes an export flag, export the extension folder as a zip +if [ "$1" == "export" ]; then + echo " + exporting extension folder as zip + " + zip -r extension.zip extension +fi \ No newline at end of file