forked from sam/fedifeed
Sam Therapy
73a0ccf871
Make it an ES module, TODO: Typescript Make the themes explicitly mastodon Signed-off-by: Sam Therapy <sam@samtherapy.net>
22 lines
492 B
JavaScript
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');
|