Initial commit
This commit is contained in:
commit
bd6876490b
13 changed files with 1444 additions and 0 deletions
32
index.js
Normal file
32
index.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Implementation sourced from eleventyone starter kit
|
||||
* https://github.com/philhawksworth/eleventyone
|
||||
* ---
|
||||
* https://github.com/philhawksworth/eleventyone/blob/master/src/site/css/styles.11ty.js
|
||||
*/
|
||||
import fs from "node:fs";
|
||||
import postcss from "postcss";
|
||||
import cssnano from "cssnano";
|
||||
|
||||
import colors from "./src/colors.js";
|
||||
import fontFamily from "./src/font-family.js";
|
||||
import fontVariables from "./src/font-variables.js";
|
||||
import spacing from "./src/spacing.js";
|
||||
|
||||
async function generateCSS() {
|
||||
const css = `${fontFamily}${fontVariables}${colors}${spacing}`;
|
||||
await postcss([cssnano])
|
||||
.process(css, {
|
||||
from: undefined,
|
||||
to: "dist/lilypad.css",
|
||||
})
|
||||
.then((result) => {
|
||||
fs.mkdirSync("dist");
|
||||
fs.writeFileSync("dist/lilypad.css", result.css);
|
||||
if (result.map) {
|
||||
fs.writeFile("dest/app.css.map", result.map.toString(), () => true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
generateCSS();
|
Loading…
Add table
Add a link
Reference in a new issue