Skip to content

Commit 87e8c80

Browse files
committed
workflow: add version of template-explorer using local deps
1 parent 3604376 commit 87e8c80

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

packages/template-explorer/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ Live explorer for template compilation output.
55
To run:
66

77
- `yarn dev template-explorer`
8-
- Open `index.html`.
8+
- Open `local.html`.
9+
10+
`index.html` uses CDN for dependencies and is continuously deployed at [https://vue-next-template-explorer.netlify.com/](https://vue-next-template-explorer.netlify.com/).

packages/template-explorer/local.html

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<title>Vue Template Explorer</title>
2+
<link rel="stylesheet" data-name="vs/editor/editor.main" href="../../node_modules/monaco-editor/min/vs/editor/editor.main.css">
3+
<link rel="stylesheet" href="./style.css">
4+
5+
<div id="header"></div>
6+
<div id="source" class="editor"></div>
7+
<div id="output" class="editor"></div>
8+
9+
<script src="../../node_modules/acorn/dist/acorn.js"></script>
10+
<script src="../../node_modules/estree-walker/dist/estree-walker.umd.js"></script>
11+
<script src="../../node_modules/source-map/dist/source-map.js"></script>
12+
<script src="../../node_modules/monaco-editor/min/vs/loader.js"></script>
13+
<script src="./dist/template-explorer.global.js"></script>
14+
<script>
15+
window._deps = {
16+
acorn,
17+
'estree-walker': estreeWalker,
18+
'source-map': sourceMap
19+
}
20+
21+
require.config({
22+
paths: {
23+
'vs': 'https://unpkg.com/monaco-editor/min/vs'
24+
}
25+
})
26+
</script>
27+
<script>
28+
require(['vs/editor/editor.main'], init /* injected by build */)
29+
</script>

0 commit comments

Comments
 (0)