aboutsummaryrefslogtreecommitdiff
path: root/save-32x32.js
diff options
context:
space:
mode:
authorFuwn <[email protected]>2020-11-06 18:24:26 -0800
committerFuwn <[email protected]>2020-11-06 18:24:26 -0800
commit9cdce4254700691301608c6f1d3081950023cc4f (patch)
tree9d24529acc19b354f80cb2d610aa1e7686f4d530 /save-32x32.js
downloadblog-9cdce4254700691301608c6f1d3081950023cc4f.tar.xz
blog-9cdce4254700691301608c6f1d3081950023cc4f.zip
repo: initial :star:
Diffstat (limited to 'save-32x32.js')
-rw-r--r--save-32x32.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/save-32x32.js b/save-32x32.js
new file mode 100644
index 0000000..5cef273
--- /dev/null
+++ b/save-32x32.js
@@ -0,0 +1,24 @@
+const exec = require("child_process").exec;
+
+const command = [
+ "cd 32x32",
+ "npm install",
+ "npm run build",
+ "mv build/static ../output/", // HACK - move static first
+ "mv build ../output/32x32",
+].join(" && ");
+
+function save32x32() {
+ return new Promise((resolve, reject) => {
+ console.log(command);
+ exec(command, (err, stdout, stderr) => {
+ if (err || stderr) {
+ return reject(err || stderr);
+ }
+
+ resolve(stdout);
+ });
+ });
+}
+
+module.exports = save32x32;