2019-12-18 22:42:09 +08:00
|
|
|
/**
|
2020-12-28 15:30:18 +08:00
|
|
|
* Convert dark.less into js vars
|
2019-12-18 22:42:09 +08:00
|
|
|
*
|
2020-12-28 15:30:18 +08:00
|
|
|
* @example
|
|
|
|
* const darkVars = require('./dark-vars');
|
2019-12-18 22:42:09 +08:00
|
|
|
*/
|
|
|
|
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');
|
|
|
|
|
2020-04-05 20:38:56 +08:00
|
|
|
const darkPaletteLess = lessToJs(darkLess, {
|
2019-12-18 22:42:09 +08:00
|
|
|
stripPrefix: true,
|
|
|
|
resolveVariables: false,
|
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = darkPaletteLess;
|