summaryrefslogtreecommitdiff
path: root/extension/scripts/package.js
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-08-09 20:56:11 -0700
committerNate Sesti <sestinj@gmail.com>2023-08-09 20:56:11 -0700
commit4636c9590154d6b5995948003da212eb25003750 (patch)
tree4a1652148f3148f801fa801e8eb4f1a55f8d7e33 /extension/scripts/package.js
parentc1a8097f0a7f3cddb0aebac26e6197ffef186972 (diff)
downloadsncontinue-4636c9590154d6b5995948003da212eb25003750.tar.gz
sncontinue-4636c9590154d6b5995948003da212eb25003750.tar.bz2
sncontinue-4636c9590154d6b5995948003da212eb25003750.zip
fix: :bug: write out npm run package as package.js
Diffstat (limited to 'extension/scripts/package.js')
-rw-r--r--extension/scripts/package.js40
1 files changed, 40 insertions, 0 deletions
diff --git a/extension/scripts/package.js b/extension/scripts/package.js
new file mode 100644
index 00000000..4703ebc2
--- /dev/null
+++ b/extension/scripts/package.js
@@ -0,0 +1,40 @@
+const { exec } = require("child_process");
+const fs = require("fs");
+
+exec("npm install", (error) => {
+ if (error) throw error;
+ console.log("npm install completed");
+
+ exec("npm run typegen", (error) => {
+ if (error) throw error;
+ console.log("npm run typegen completed");
+
+ exec("npm run clientgen", (error) => {
+ if (error) throw error;
+ console.log("npm run clientgen completed");
+
+ process.chdir("react-app");
+
+ exec("npm install", (error) => {
+ if (error) throw error;
+ console.log("npm install in react-app completed");
+
+ exec("npm run build", (error) => {
+ if (error) throw error;
+ console.log("npm run build in react-app completed");
+
+ process.chdir("..");
+
+ if (!fs.existsSync("build")) {
+ fs.mkdirSync("build");
+ }
+
+ exec("vsce package --out ./build", (error) => {
+ if (error) throw error;
+ console.log("vsce package completed");
+ });
+ });
+ });
+ });
+ });
+});