css.js
321 Bytes
const fs = require('fs');
const path = require('path');
const css = {};
module.exports = (file) => {
if (css[file]) {
return css[file];
}
const cssPath = path.join(__dirname, 'css', file);
const cssfile = fs.readFileSync(cssPath).toString();
css[file] = cssfile;
return css[file];
};