@@ -3,7 +3,7 @@ const fss = require("fs");
33const config = require ( "./build_config" ) ;
44const glob = require ( "glob-promise" ) ;
55const { getLanguages } = require ( "./lib/language" ) ;
6- const { install, mkdir } = require ( "./lib/makestuff" ) ;
6+ const { install, mkdir, installCleanCSS } = require ( "./lib/makestuff" ) ;
77const { filter } = require ( "./lib/dependencies" ) ;
88const { rollupWrite } = require ( "./lib/bundling.js" ) ;
99const log = ( ...args ) => console . log ( ...args ) ;
@@ -163,8 +163,13 @@ async function buildNode(options) {
163163 const stat = fss . statSync ( `./src/styles/${ file } ` ) ;
164164 if ( stat . isDirectory ( ) ) return ;
165165
166- install ( `./src/styles/${ file } ` , `styles/${ file } ` ) ;
167- install ( `./src/styles/${ file } ` , `scss/${ file . replace ( ".css" , ".scss" ) } ` ) ;
166+ if ( file . endsWith ( ".css" ) ) {
167+ installCleanCSS ( `./src/styles/${ file } ` , `styles/${ file } ` ) ;
168+ installCleanCSS ( `./src/styles/${ file } ` , `scss/${ file . replace ( ".css" , ".scss" ) } ` ) ;
169+ } else {
170+ // images, etc.
171+ install ( `./src/styles/${ file } ` , `styles/${ file } ` ) ;
172+ }
168173 } ) ;
169174
170175 let languages = await getLanguages ( ) ;
0 commit comments