forked from shadowfacts/shadowfacts.net
Use environment variable for minifying CSS
This commit is contained in:
parent
78a478592d
commit
08efa719f6
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue