2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-12-23 10:38:58 +00:00

fix: remove nunjucks from nginx image preparation

This commit is contained in:
Revant Nandgaonkar 2020-08-07 15:28:15 +05:30
parent dcf0c0f8b1
commit a3bdc3c8f9
3 changed files with 4 additions and 25 deletions

View File

@ -1,3 +1,7 @@
# This image uses nvm and same base image as the worker image.
# This is done to ensures that node-sass binary remains common.
# node-sass is required to enable website theme feature used
# by Website Manager role in Frappe Framework
FROM bitnami/python:3.7-prod
ENV NVM_DIR=/root/.nvm
@ -21,9 +25,6 @@ RUN mkdir -p apps sites/assets/css \
&& cd apps \
&& git clone --depth 1 https://github.com/frappe/frappe --branch $GIT_BRANCH
COPY build/frappe-nginx/generate_standard_style_css.js \
/home/frappe/frappe-bench/apps/frappe/generate_standard_style_css.js
COPY build/frappe-nginx/build.sh /build.sh
RUN /build.sh
RUN node --version \

View File

@ -8,18 +8,10 @@ function nodeCleanUp() {
cd /home/frappe/frappe-bench/apps/frappe
yarn
yarn run production
# Remove this after python container starts using node command
yarn add nunjucks -D
if [[ "$GIT_BRANCH" =~ ^(version-12|version-11)$ ]]; then
nodeCleanUp
else
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)"
nodeCleanUp
# remove this when frappe framework moves this to dependencies from devDependencies
yarn add node-sass

View File

@ -1,14 +0,0 @@
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"));