Skip to content

Commit

Permalink
workflow: add version of template-explorer using local deps
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 31, 2020
1 parent 3604376 commit 87e8c80
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/template-explorer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ Live explorer for template compilation output.
To run:

- `yarn dev template-explorer`
- Open `index.html`.
- Open `local.html`.

`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/).
29 changes: 29 additions & 0 deletions packages/template-explorer/local.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<title>Vue Template Explorer</title>
<link rel="stylesheet" data-name="vs/editor/editor.main" href="../../node_modules/monaco-editor/min/vs/editor/editor.main.css">
<link rel="stylesheet" href="./style.css">

<div id="header"></div>
<div id="source" class="editor"></div>
<div id="output" class="editor"></div>

<script src="../../node_modules/acorn/dist/acorn.js"></script>
<script src="../../node_modules/estree-walker/dist/estree-walker.umd.js"></script>
<script src="../../node_modules/source-map/dist/source-map.js"></script>
<script src="../../node_modules/monaco-editor/min/vs/loader.js"></script>
<script src="./dist/template-explorer.global.js"></script>
<script>
window._deps = {
acorn,
'estree-walker': estreeWalker,
'source-map': sourceMap
}

require.config({
paths: {
'vs': 'https://unpkg.com/monaco-editor/min/vs'
}
})
</script>
<script>
require(['vs/editor/editor.main'], init /* injected by build */)
</script>

0 comments on commit 87e8c80

Please sign in to comment.