From 9643cfc9db525b557926a0d9aa222990162bb6b9 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Tue, 10 Apr 2018 20:12:41 -0700 Subject: [PATCH] emit theme scss as compressed --- bin/build-sass.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/build-sass.js b/bin/build-sass.js index 731555f..31ba91e 100755 --- a/bin/build-sass.js +++ b/bin/build-sass.js @@ -22,7 +22,7 @@ const themesScssDir = path.join(__dirname, '../scss/themes') const assetsDir = path.join(__dirname, '../assets') function doWatch () { - var start = now() + let start = now() chokidar.watch(scssDir).on('change', debounce(() => { console.log('Recompiling SCSS...') Promise.all([ @@ -54,7 +54,7 @@ async function compileGlobalSass () { async function compileThemesSass () { let files = (await readdir(themesScssDir)).filter(file => !path.basename(file).startsWith('_')) await Promise.all(files.map(async file => { - let res = await render({file: path.join(themesScssDir, file)}) + let res = await render({file: path.join(themesScssDir, file), outputStyle: 'compressed'}) let outputFilename = 'theme-' + path.basename(file).replace(/\.scss$/, '.css') await writeFile(path.join(assetsDir, outputFilename), res.css, 'utf8') }))