afc163
9 years ago
9 changed files with 30 additions and 11 deletions
@ -1 +1,2 @@ |
|||
@import "./themes/default"; |
|||
@import "./core/index.less"; |
|||
|
@ -1,7 +1,20 @@ |
|||
#!/usr/bin/env node
|
|||
|
|||
/* eslint no-console:0, strict:0 */ |
|||
|
|||
/* eslint-disable */ |
|||
'use strict'; |
|||
|
|||
console.log('prepub'); |
|||
// Build a entry less file to dist/antd.less
|
|||
var fs = require('fs'); |
|||
var path = require('path'); |
|||
var componentsPath = path.join(process.cwd(), 'components'); |
|||
var entryLessContent = `@import "../lib/style/index.less";`; |
|||
console.log('Building a entry less file to dist/antd.less'); |
|||
|
|||
fs.readdir(componentsPath, function(err, files) { |
|||
files.forEach(function(file) { |
|||
if (fs.existsSync(path.join(componentsPath, file, 'style', 'index.less'))) { |
|||
entryLessContent += `\n@import "../lib/${path.join(file, 'style', 'index.less')}";` |
|||
} |
|||
}); |
|||
fs.writeFileSync(path.join(process.cwd(), 'dist', 'antd.less'), entryLessContent); |
|||
}); |
|||
|
Loading…
Reference in new issue