2017-04-14 13:47:33 -04:00
|
|
|
const Vue = require("vue");
|
2017-04-09 15:59:57 -04:00
|
|
|
|
|
|
|
function exists(id) {
|
|
|
|
return document.getElementById(id) !== null;
|
|
|
|
}
|
|
|
|
|
|
|
|
let vueMapping = {
|
2017-04-15 14:16:07 -04:00
|
|
|
'search-system': require('./search'),
|
|
|
|
'entity-dashboard': require('./entity-search'),
|
2017-07-01 08:23:46 -04:00
|
|
|
'code-editor': require('./code-editor')
|
2017-04-09 15:59:57 -04:00
|
|
|
};
|
|
|
|
|
2017-07-01 08:23:46 -04:00
|
|
|
window.vues = {};
|
|
|
|
|
2017-04-09 15:59:57 -04:00
|
|
|
Object.keys(vueMapping).forEach(id => {
|
|
|
|
if (exists(id)) {
|
|
|
|
let config = vueMapping[id];
|
|
|
|
config.el = '#' + id;
|
2017-07-01 08:23:46 -04:00
|
|
|
window.vues[id] = new Vue(config);
|
2017-04-09 15:59:57 -04:00
|
|
|
}
|
|
|
|
});
|