Add exports

pull/12/head
cagataycivici 2019-05-25 19:10:26 +03:00
parent be012e97a2
commit 2b03fca1b2
45 changed files with 133 additions and 9 deletions

View File

@ -7,19 +7,11 @@ fs.readdirSync(path.resolve(__dirname, './src/components/')).forEach(folder => {
fs.readdirSync(path.resolve(__dirname, './src/components/' + folder)).forEach(file => { fs.readdirSync(path.resolve(__dirname, './src/components/' + folder)).forEach(file => {
if (/\.vue$/.test(file) || /\.js$/.test(file)) { if (/\.vue$/.test(file) || /\.js$/.test(file)) {
let filename = file.split('.vue')[0].toLowerCase(); let filename = file.split('.vue')[0].toLowerCase();
console.log('Building ' + filename);
execSync( execSync(
`node ${vueCliServicePath} build src/components/${folder}/${file} --target lib --name ${filename} --dest components/${folder} --no-clean ` `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!');
});
} }
}); });
}); });

3
exports/accordion.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/accordion/accordion.common');

3
exports/accordiontab.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/accordiontab/accordiontab.common');

3
exports/autocomplete.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/autocomplete/autocomplete.common');

3
exports/button.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/button/button.common');

3
exports/calendar.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/calendar/calendar.common');

3
exports/card.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/card/card.common');

3
exports/chart.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/chart/chart.common');

3
exports/checkbox.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/checkbox/checkbox.common');

3
exports/chips.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/chips/chips.common');

3
exports/dataview.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/dataview/dataview.common');

View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/dataviewlayoutoptions/dataviewlayoutoptions.common');

3
exports/dialog.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/dialog/dialog.common');

3
exports/dropdown.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/dropdown/dropdown.common');

3
exports/editor.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/editor/editor.common');

3
exports/fieldset.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/fieldset/fieldset.common');

3
exports/fileupload.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/fileupload/fileupload.common');

3
exports/fullcalendar.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/fullcalendar/fullcalendar.common');

3
exports/inputswitch.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/inputswitch/inputswitch.common');

3
exports/inputtext.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/inputtext/inputtext.common');

3
exports/listbox.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/listbox/listbox.common');

3
exports/message.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/message/message.common');

3
exports/multiselect.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/multiselect/multiselect.common');

3
exports/overlaypanel.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/overlaypanel/overlaypanel.common');

3
exports/paginator.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/paginator/paginator.common');

3
exports/panel.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/panel/panel.common');

3
exports/password.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/password/password.common');

3
exports/progressbar.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/progressbar/progressbar.common');

3
exports/radiobutton.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/radiobutton/radiobutton.common');

3
exports/rating.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/rating/rating.common');

3
exports/selectbutton.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/selectbutton/selectbutton.common');

3
exports/sidebar.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/sidebar/sidebar.common');

3
exports/slider.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/slider/slider.common');

3
exports/spinner.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/spinner/spinner.common');

3
exports/splitbutton.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/splitbutton/splitbutton.common');

3
exports/tabpanel.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/tabpanel/tabpanel.common');

3
exports/tabview.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/tabview/tabview.common');

3
exports/textarea.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/textarea/textarea.common');

3
exports/toast.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/toast/toast.common');

3
exports/toasteventbus.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/toast/toasteventbus.js.common');

3
exports/toastservice.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/toast/toastservice.js.common');

3
exports/togglebutton.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/togglebutton/togglebutton.common');

3
exports/toolbar.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/toolbar/toolbar.common');

View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/tristatecheckbox/tristatecheckbox.common');

View File

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./components/validationmessage/validationmessage.common');