UNPKG

vue-sauce

Version:

"View source" directive for Vue 🍝

64 lines (62 loc) 1.99 kB
<!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>vue-sauce</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous" /> <style> .vue-sauce { max-width: 640px; } </style> </head> <body> <div id="app" class="container my-3"> <div class="mx-auto max-width-4"> <h1>vue-sauce</h1> <p>"View source" directive for Vue 🍝.</p> <p> Automatically append up-to-date html documentation to your elements. </p> <h3>Example</h3> <h4 class="my-3">Source:</h4> <div> <code >&lt;button v-sauce class=&quot;primary button&quot;&gt;Primary button&lt;/button&gt;</code > </div> <div> <code >&lt;button v-sauce class=&quot;positive button&quot;&gt;Positive button&lt;/button&gt;</code > </div> <h4 class="my-3">Result:</h4> <div> <button v-sauce class="btn btn-primary">Primary button</button> <button v-sauce class="btn btn-success">Success button</button> </div> </div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script> <script> hljs.initHighlightingOnLoad(); </script> <script src="https://unpkg.com/vue/dist/vue.min.js"></script> <script src="./dist/vue-sauce.js"></script> <script> Vue.directive("sauce", window["vue-sauce"].default); new Vue({ el: "#app" }); </script> </body> </html>