]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
workflow: add version of template-explorer using local deps
authorEvan You <yyx990803@gmail.com>
Thu, 30 Jan 2020 21:30:51 +0000 (16:30 -0500)
committerEvan You <yyx990803@gmail.com>
Fri, 31 Jan 2020 15:01:33 +0000 (10:01 -0500)
packages/template-explorer/README.md
packages/template-explorer/local.html [new file with mode: 0644]

index 3a5918ff151a1251d0455fce4bc014d9baf4f461..05532f4bcc711b4be772b2578f56847d7d0a53c2 100644 (file)
@@ -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/).
diff --git a/packages/template-explorer/local.html b/packages/template-explorer/local.html
new file mode 100644 (file)
index 0000000..8cebd4e
--- /dev/null
@@ -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>