summaryrefslogtreecommitdiff
path: root/web/gotosocial-styling/index.js
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-09-24 13:14:20 +0200
committerLibravatar GitHub <noreply@github.com>2021-09-24 13:14:20 +0200
commitd515c9f1ec4df612a24bff77fe57c75744946651 (patch)
treecf176ecd9ad1f5c3b8ec7fa3b036c163491e737d /web/gotosocial-styling/index.js
parentupstep bun version (#243) (diff)
downloadgotosocial-d515c9f1ec4df612a24bff77fe57c75744946651.tar.xz
Goreleaser (#241)
* add goreleaser tooling * add files + hook * update hooks * allow passing build-dir using cli args * build tweaks * tweak more * update drone and goreleaser * chill out tests * remove postgres * docker push on snapshot * update releaser
Diffstat (limited to 'web/gotosocial-styling/index.js')
-rw-r--r--web/gotosocial-styling/index.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/web/gotosocial-styling/index.js b/web/gotosocial-styling/index.js
index 88d9398b2..43384a108 100644
--- a/web/gotosocial-styling/index.js
+++ b/web/gotosocial-styling/index.js
@@ -4,6 +4,7 @@ const Promise = require("bluebird");
const fs = require("fs").promises;
const postcss = require('postcss');
const {parse} = require("postcss-scss");
+const argv = require('minimist')(process.argv.slice(2));
/*
Bundle all postCSS files under the `templates/` directory separately, each prepended with the (variable) contents of ./colors.css
@@ -42,10 +43,23 @@ function bundle([template, path]) {
});
}
-let buildDir = process.env.BUILD_DIR;
+let buildDir
+
+// try reading from arguments first
+if (argv["build-dir"] != undefined) {
+ buildDir = argv["build-dir"]
+}
+
+// then try reading from environment variable
+if (buildDir == undefined) {
+ buildDir = process.env.BUILD_DIR;
+}
+
+// then take default
if (buildDir == undefined) {
buildDir = `${__dirname}/build`;
}
+
console.log("bundling to", buildDir);
function bundleAll() {