zefeng
5 years ago
committed by
GitHub
5 changed files with 26 additions and 6 deletions
@ -0,0 +1,19 @@ |
|||||
|
/** |
||||
|
* convert default.less into js vars |
||||
|
* |
||||
|
* 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; |
Loading…
Reference in new issue