forked from evanw/source-map-visualization
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
99 lines (90 loc) · 2.93 KB
/
index.html
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<link rel="icon" href="favicon.png" type="image/png" />
<title>Source Map Visualization</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div id="dragTarget"></div>
<div id="promptText">
<section>
<h1>Source Map Visualization</h1>
<blockquote>
This is a visualization of JavaScript/<wbr />CSS source map data, which is useful for
debugging problems with generated source maps. It's designed to be high-performance so it
doesn't fall over with huge source maps.
</blockquote>
<hr />
<h2>LOCAL</h2>
<blockquote>
to get started. You can either drop a single JavaScript/<wbr /> CSS file with an inline
source map comment, or a JavaScript/<wbr />
CSS file and a separate source map file together.
<button id="uploadFiles">UPLOAD FILE</button>
</blockquote>
<hr />
<h2>REMOTE</h2>
<blockquote>
<div style="display: flex; place-content: stretch; margin: 8px">
<pre>?url={SOURCEMAP}</pre>
<button id="loadRemote" style="width: 70%; margin: auto">LOAD URL</button>
</div>
<input
type="text"
id="remoteUrl"
placeholder="https://cdn.example.com/assets/bundle.js.map
"
/>
</blockquote>
<hr />
<h2>EXAMPLE</h2>
<blockquote>
Load an example to play around with the visualization
<span style="margin: auto">
<button id="loadExample">LOAD EXAMPLE FILE</button>
<button id="loadExampleURL">LOAD EXAMPLE URL</button>
</span>
</blockquote>
<div id="errorText"></div>
<noscript>
This app requires JavaScript to work. Please enable JavaScript and reload the page.
</noscript>
</section>
</div>
<div id="theme">
<svg
id="theme-toggle"
xmlns="http://www.w3.org/2000/svg"
width="48"
height="48"
viewBox="0 0 48 48"
>
<title>Toggle theme</title>
<g
fill="none"
stroke="#ff779966"
stroke-linejoin="round"
stroke-linecap="round"
stroke-width="4"
>
<path
stroke-linecap="round"
d="M24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44V4Z"
clip-rule="evenodd"
/>
<path
fill="#EEBBFF88"
d="M24 4C35.0457 4 44 12.9543 44 24C44 35.0457 35.0457 44 24 44V4Z"
/>
<path stroke-linecap="round" d="M24 36H9" />
<path stroke-linecap="round" d="M24 28H5" />
<path stroke-linecap="round" d="M24 20H5" />
<path stroke-linecap="round" d="M24 12H9" />
</g>
</svg>
</div>
<script type="module" src="code.js"></script>
</body>
</html>