mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
new styling for frontpage, update login and authorize templates (#46)
* new styling for frontpage, update login and authorize templates * run go fmt * add AssetBaseDir to command flag parsing * untested: move landing page to it's own router * go fmt, fix typo * fix package, adapt to proper Route structure
This commit is contained in:
23
web/source/build.js
Normal file
23
web/source/build.js
Normal file
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
|
||||
const fs = require("fs").promises;
|
||||
const postcss = require('postcss');
|
||||
const {parse} = require("postcss-scss");
|
||||
|
||||
const postcssPlugins = ["postcss-strip-inline-comments", "postcss-nested", "postcss-simple-vars", "postcss-color-function"].map((plugin) => require(plugin)());
|
||||
|
||||
let inputFile = `${__dirname}/style.css`;
|
||||
let outputFile = `${__dirname}/../assets/bundle.css`;
|
||||
|
||||
fs.readFile(inputFile, "utf-8").then((input) => {
|
||||
return parse(input);
|
||||
}).then((ast) => {
|
||||
return postcss(postcssPlugins).process(ast, {
|
||||
from: "style.css",
|
||||
to: "bundle.css"
|
||||
});
|
||||
}).then((bundle) => {
|
||||
return fs.writeFile(outputFile, bundle.css);
|
||||
}).then(() => {
|
||||
console.log("Finished writing CSS bundle");
|
||||
});
|
Reference in New Issue
Block a user