fedifeed/build-styles.js
Sam Therapy 73a0ccf871
Redo app from the ground up
Make it an ES module, TODO: Typescript
Make the themes explicitly mastodon

Signed-off-by: Sam Therapy <sam@samtherapy.net>
2022-02-06 13:14:18 -06:00

22 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');