mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
import base.css in component styles
This commit is contained in:
parent
4dd1a45d8e
commit
84634bb77d
@ -52,9 +52,12 @@ Object.keys(components).forEach((componentName) => {
|
|||||||
const dir = path.join(__dirname, '../../lib/', componentName, '/style');
|
const dir = path.join(__dirname, '../../lib/', componentName, '/style');
|
||||||
const file = path.join(dir, 'index.js');
|
const file = path.join(dir, 'index.js');
|
||||||
const cssPath = path.join(__dirname, '../../lib/vant-css/', `${componentName}.css`);
|
const cssPath = path.join(__dirname, '../../lib/vant-css/', `${componentName}.css`);
|
||||||
const content = fs.existsSync(cssPath) ? `require('../../vant-css/${componentName}.css');` : '';
|
const content = [`require('../../vant-css/base.css');`];
|
||||||
|
if (fs.existsSync(cssPath)) {
|
||||||
|
content.push(`require('../../vant-css/${componentName}.css');`);
|
||||||
|
}
|
||||||
mkdir(dir);
|
mkdir(dir);
|
||||||
writeFile(file, content);
|
writeFile(file, content.join('\n'));
|
||||||
});
|
});
|
||||||
log('Finished', 'build:style-entries');
|
log('Finished', 'build:style-entries');
|
||||||
|
|
||||||
|
5
packages/vant-css/src/base.css
Normal file
5
packages/vant-css/src/base.css
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
/**
|
||||||
|
* 基本样式入口
|
||||||
|
*/
|
||||||
|
|
||||||
|
@import './reset.css';
|
Loading…
x
Reference in New Issue
Block a user