2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-14 00:54:07 +00:00
frappe_docker/build/frappe-nginx/generate_standard_style_css.js
Revant Nandgaonkar 4f411104f3 fix(frappe-nginx): Generate Standard Style CSS
use nunjucks to render jinja2 template
generate default theme
2020-04-23 14:56:46 +05:30

15 lines
399 B
JavaScript

const nunjucks = require("nunjucks");
const templatePath = process.argv[2];
const pathArray = templatePath.split("/");
const templateFile = pathArray.pop();
const templateDir = pathArray.join("/");
nunjucks.configure(templateDir);
const rendered = nunjucks.render(templateFile, {
button_rounded_corners: true,
font_properties: "300,600",
});
console.log(rendered.replace(/\n/gm, "\\n"));