Add exports
parent
be012e97a2
commit
2b03fca1b2
10
build-lib.js
10
build-lib.js
|
@ -7,19 +7,11 @@ 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();
|
||||
console.log('Building ' + filename);
|
||||
|
||||
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!');
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/accordion/accordion.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/accordiontab/accordiontab.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/autocomplete/autocomplete.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/button/button.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/calendar/calendar.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/card/card.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/chart/chart.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/checkbox/checkbox.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/chips/chips.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/dataview/dataview.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/dataviewlayoutoptions/dataviewlayoutoptions.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/dialog/dialog.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/dropdown/dropdown.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/editor/editor.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/fieldset/fieldset.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/fileupload/fileupload.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/fullcalendar/fullcalendar.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/inputswitch/inputswitch.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/inputtext/inputtext.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/listbox/listbox.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/message/message.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/multiselect/multiselect.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/overlaypanel/overlaypanel.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/paginator/paginator.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/panel/panel.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/password/password.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/progressbar/progressbar.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/radiobutton/radiobutton.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/rating/rating.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/selectbutton/selectbutton.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/sidebar/sidebar.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/slider/slider.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/spinner/spinner.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/splitbutton/splitbutton.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/tabpanel/tabpanel.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/tabview/tabview.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/textarea/textarea.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/toast/toast.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/toast/toasteventbus.js.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/toast/toastservice.js.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/togglebutton/togglebutton.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/toolbar/toolbar.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/tristatecheckbox/tristatecheckbox.common');
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
module.exports = require('./components/validationmessage/validationmessage.common');
|
||||
|
Loading…
Reference in New Issue