mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-12-23 10:38:58 +00:00
Merge pull request #210 from revant/fix-website-style-css
This commit is contained in:
commit
aac3efb24b
@ -6,13 +6,23 @@ RUN mkdir -p /home/frappe/frappe-bench/sites \
|
||||
|
||||
RUN install_packages git
|
||||
|
||||
RUN mkdir -p apps sites/assets \
|
||||
RUN mkdir -p apps sites/assets/css \
|
||||
&& cd apps \
|
||||
&& git clone --depth 1 https://github.com/frappe/frappe
|
||||
|
||||
COPY build/frappe-nginx/generate_standard_style_css.js \
|
||||
/home/frappe/frappe-bench/apps/frappe/generate_standard_style_css.js
|
||||
|
||||
RUN cd /home/frappe/frappe-bench/apps/frappe \
|
||||
&& yarn \
|
||||
&& yarn run production \
|
||||
&& yarn add nunjucks -D \
|
||||
&& node generate_standard_style_css.js \
|
||||
frappe/website/doctype/website_theme/website_theme_template.scss > \
|
||||
/home/frappe/standard_templates_string \
|
||||
&& node generate_bootstrap_theme.js \
|
||||
/home/frappe/frappe-bench/sites/assets/css/standard_style.css \
|
||||
"$(cat /home/frappe/standard_templates_string)" \
|
||||
&& rm -fr node_modules \
|
||||
&& yarn install --production=true \
|
||||
&& node --version \
|
||||
|
14
build/frappe-nginx/generate_standard_style_css.js
Normal file
14
build/frappe-nginx/generate_standard_style_css.js
Normal file
@ -0,0 +1,14 @@
|
||||
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"));
|
@ -6,13 +6,23 @@ RUN mkdir -p /home/frappe/frappe-bench/sites \
|
||||
|
||||
RUN install_packages git
|
||||
|
||||
RUN mkdir -p apps sites/assets \
|
||||
RUN mkdir -p apps sites/assets/css \
|
||||
&& cd apps \
|
||||
&& git clone --depth 1 https://github.com/frappe/frappe --branch version-12
|
||||
|
||||
COPY build/frappe-nginx/generate_standard_style_css.js \
|
||||
/home/frappe/frappe-bench/apps/frappe/generate_standard_style_css.js
|
||||
|
||||
RUN cd /home/frappe/frappe-bench/apps/frappe \
|
||||
&& yarn \
|
||||
&& yarn run production \
|
||||
&& yarn add nunjucks -D \
|
||||
&& node generate_standard_style_css.js \
|
||||
frappe/website/doctype/website_theme/website_theme_template.scss > \
|
||||
/home/frappe/standard_templates_string \
|
||||
&& node generate_bootstrap_theme.js \
|
||||
/home/frappe/frappe-bench/sites/assets/css/standard_style.css \
|
||||
"$(cat /home/frappe/standard_templates_string)" \
|
||||
&& rm -fr node_modules \
|
||||
&& yarn install --production=true \
|
||||
&& node --version \
|
||||
|
Loading…
Reference in New Issue
Block a user