Use environment variable for minifying CSS

This commit is contained in:
Shadowfacts 2019-01-05 10:29:38 -05:00
parent 78a478592d
commit 08efa719f6
Signed by untrusted user: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 2 additions and 2 deletions

View File

@ -3,11 +3,11 @@ import * as util from "../util";
import sass, { Result as SassResult } from "node-sass";
import ejs from "ejs";
function renderSass(data: string, minify = false): Promise<SassResult> {
function renderSass(data: string): Promise<SassResult> {
return new Promise((resolve, reject) => {
sass.render({
data: data,
outputStyle: minify ? "compressed" : "expanded"
outputStyle: process.env.MINIFY_CSS ? "compressed" : "expanded"
}, (error, result) => {
if (error) reject(error);
else resolve(result);