My own data-binding implementation engine
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist
example
src
.babelrc
.gitignore
README.md
package.json
rollup.config.js

README.md

Lyon

My own data-binding implementation engine. see lyon alive

How to use

<!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">
  <link rel="stylesheet" href="main.css">
  <title>Lyon <3</title>
</head>
<body>

  <div class="editor">
    <textarea ly-model="markdown" ly-event="input, parseMarkdown"></textarea>
    <div ly-bind="markdownParsed"></div>
  </div>

  <script src="https://unpkg.com/marked@0.3.6"></script>
  <script src="../dist/lyon.umd.js"></script>
  <script>

    const lyon = new Lyon({
      observe: () => ({
        markdownParsed: '',
        markdown: ''
      }),
      methods: {
        parseMarkdown () {
          this.markdownParsed = marked(this.markdown)
        }
      }
    })
  </script>
</body>
</html>