DataView import refactor
parent
dcdf70ac66
commit
be012e97a2
10
build-lib.js
10
build-lib.js
|
@ -7,9 +7,19 @@ fs.readdirSync(path.resolve(__dirname, './src/components/')).forEach(folder => {
|
|||
fs.readdirSync(path.resolve(__dirname, './src/components/' + folder)).forEach(file => {
|
||||
if (/\.vue$/.test(file) || /\.js$/.test(file)) {
|
||||
let filename = file.split('.vue')[0].toLowerCase();
|
||||
|
||||
execSync(
|
||||
`node ${vueCliServicePath} build src/components/${folder}/${file} --target lib --name ${filename} --dest components/${folder} --no-clean `
|
||||
)
|
||||
|
||||
let shorthandContent =
|
||||
`'use strict';\nmodule.exports = require('./components/${folder}/${filename}.common');
|
||||
`;
|
||||
|
||||
fs.writeFileSync('./exports' + filename +'.js', shorthandContent, function (err) {
|
||||
if (err) throw err;
|
||||
console.log('Saved!');
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
|
@ -11,7 +11,7 @@ import Chart from './components/chart/Chart';
|
|||
import Checkbox from './components/checkbox/Checkbox';
|
||||
import Chips from './components/chips/Chips';
|
||||
import DataView from './components/dataview/DataView';
|
||||
import DataViewLayoutOptions from './components/dataview/DataViewLayoutOptions';
|
||||
import DataViewLayoutOptions from './components/dataviewlayoutoptions/DataViewLayoutOptions';
|
||||
import Dialog from './components/dialog/Dialog';
|
||||
import Dropdown from './components/dropdown/Dropdown';
|
||||
import Editor from './components/editor/Editor';
|
||||
|
|
Loading…
Reference in New Issue