[improvement] move overlay component (#2192)

This commit is contained in:
neverland
2018-11-30 16:40:50 +08:00
committed by GitHub
parent 996c67b4fc
commit 89ff50944c
11 changed files with 40 additions and 18 deletions
+15 -2
View File
@@ -6,7 +6,15 @@ const fs = require('fs-extra');
const path = require('path');
const components = require('./get-components')();
const dependencyTree = require('dependency-tree');
const whiteList = ['info', 'icon', 'loading', 'cell', 'cell-group', 'button'];
const whiteList = [
'info',
'icon',
'loading',
'cell',
'cell-group',
'button',
'overlay'
];
const dir = path.join(__dirname, '../es');
components.forEach(component => {
@@ -22,7 +30,12 @@ function destEntryFile(component, filename, ext = '') {
);
const esEntry = path.join(dir, component, `style/${filename}`);
const libEntry = path.join(__dirname, '../lib', component, `style/${filename}`);
const libEntry = path.join(
__dirname,
'../lib',
component,
`style/${filename}`
);
const esContent = deps.map(dep => `import '${dep}';`).join('\n');
const libContent = deps.map(dep => `require('${dep}');`).join('\n');