mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-15 17:19:11 +08:00
21 lines
621 B
JavaScript
21 lines
621 B
JavaScript
/**
|
|
* Convert default.less into js vars
|
|
*
|
|
* @example
|
|
* const darkVars = require('./default-vars');
|
|
*/
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
const lessToJs = require('less-vars-to-js');
|
|
|
|
const stylePath = path.join(__dirname, '..', 'components', 'style');
|
|
const colorLess = fs.readFileSync(path.join(stylePath, 'color', 'colors.less'), 'utf8');
|
|
const defaultLess = fs.readFileSync(path.join(stylePath, 'themes', 'default.less'), 'utf8');
|
|
|
|
const defaultPaletteLess = lessToJs(`${colorLess}${defaultLess}`, {
|
|
stripPrefix: true,
|
|
resolveVariables: false,
|
|
});
|
|
|
|
module.exports = defaultPaletteLess;
|