-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
30 lines (23 loc) · 904 Bytes
/
index.js
File metadata and controls
30 lines (23 loc) · 904 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import Loremsition from './src/main.js'
import './css/sortCss.css';
// import './examples/horizontal-unary/horizontal-unary.css';
// import './examples/vertical-binary/vertical-binary.css';
// import './examples/vertical-n-ary/vertical-n-ary.css';
import 'core-js/features/promise';
import 'whatwg-fetch';
(function () {
var path = window.location.pathname.split('/').join('');
var myRe = /((vertical|horizontal)[-\w]+)/
var test = myRe.exec(path)[0];
if (test) {
var assets = {
css : import(`./examples/${test}/${test}.css`),
html : import(`./examples/${test}/${test}.html`),
js : import(`./examples/${test}/${test}.js`)
}
}
Promise.all([assets.css, assets.html, assets.js]).then(function(values) {
document.querySelector('.container').innerHTML = values[1].default;
values[2]['default'](Loremsition)
});
}());