/
index.js
43 lines (38 loc) · 1.11 KB
/
index.js
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
31
32
33
34
35
36
37
38
39
40
41
42
43
import { Init } from "domponent";
import Counter from "./Counter/Counter";
import Timer from "./Timer/Timer";
import DisplayAnything from "./DisplayAnything/DisplayAnything";
import FavoriteShow from "./FavoriteShow/FavoriteShow";
import HoverLetter from "./HoverLetter/HoverLetter";
import Navigation from "./Navigation/Navigation";
import ShowCode from "./ShowCode/ShowCode";
import Tabs from "./Tabs/Tabs";
import AddHighlight from "./AddHighlight/AddHighlight";
import domInsert from "./domInsert";
import "./app.scss";
feather.replace();
console.time("appCreation");
const App = new Init({
selector: document.getElementById("root"),
components: {
Counter,
Timer,
DisplayAnything,
FavoriteShow,
HoverLetter,
Navigation,
ShowCode,
Tabs,
AddHighlight
},
appCreated: () => console.log("app created")
});
console.timeEnd("appCreation");
window.DomponentApp = App;
setTimeout(() => {
domInsert("id2");
App.createComponent(document.getElementById("id2"), () => feather.replace());
App.createComponent(document.getElementById("async-props"), () =>
feather.replace()
);
}, 1000);