This repository has been archived on 2023-05-27. You can view files and clone it, but cannot push or open issues or pull requests.
fedifeed/build-styles.js

23 lines
492 B
JavaScript

// build the styles
import { readFileSync, writeFileSync } from 'fs';
import { renderSync } from 'node-sass';
var staticDir = './static/'
var srcDir = './stylesrc/';
var themes = ['masto-light','masto-dark','masto-auto'];
themes.forEach(function(s){
var sassFile = srcDir+s+'.scss'
var cssFile = staticDir+s+'.css'
var result = renderSync({
data: readFileSync(sassFile,'utf8'),
includePaths:[srcDir]
});
writeFileSync(cssFile,result.css,'utf8')
});
console.log('ok');