-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
30 lines (29 loc) · 1.38 KB
/
index.html
File metadata and controls
30 lines (29 loc) · 1.38 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
</head>
<body>
<!-- id you can choose you want -->
<div id="ts"></div>
<script type="text/javascript" src="/static/js/typescript.js"></script>
<!-- this is removed when production level build only typescript.js loaded and then load_typescript must call this -->
<script type="text/javascript" src="/static/js/static_file.js"></script>
<script type="text/javascript">
// this is function example and
window.onload = () => {
let url_config = {
fetch_url: "/ts_static", // fetch url on express server all are post request
ts_file: ["index.ts", "main.ts"], // filename in array for sequence loading file
inject_id: "ts", // this is div id
target: null // this null then automatically check browser js version like es6 , es5 if set to es6 or es5 it will compile only setted value
};
// now contruct the class loadscript with send object to it
let ts_now = new load_typescript(url_config);
};
</script>
</body>
</html>