mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-06 05:58:46 +08:00
20 lines
494 B
JavaScript
20 lines
494 B
JavaScript
/**
|
|
* Convert dark.less into js vars
|
|
*
|
|
* @example
|
|
* 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, {
|
|
stripPrefix: true,
|
|
resolveVariables: false,
|
|
});
|
|
|
|
module.exports = darkPaletteLess;
|