ant-design/scripts/dark-vars.js

19 lines
480 B
JavaScript
Raw Normal View History

2019-12-18 22:42:09 +08:00
/**
* convert dark.less into js vars
*
* const darkVars = require('./dark-vars');
*/
const fs = require('fs');
const path = require('path');
const lessToJs = require('less-vars-to-js');
const stylePath = path.join(__dirname, '..', 'components', 'style');
const darkLess = fs.readFileSync(path.join(stylePath, 'themes', 'dark.less'), 'utf8');
const darkPaletteLess = lessToJs(darkLess, {
2019-12-18 22:42:09 +08:00
stripPrefix: true,
resolveVariables: false,
});
module.exports = darkPaletteLess;