choojs / nanomorph

🚅 - Hyper fast diffing algorithm for real DOM nodes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

usage without require/module manager

sido420 opened this issue · comments

I haven't modified my project to use any kind of module manager yet. So, is this possible to use nanomorph by using regular script tags only?

what would be required if this cant be done through npm?

I use *-umd files from morpdom.

You can use the https://wzrd.in browserify cdn to get a UMD module bundle that you can use in a script tag:

<script src="https://wzrd.in/standalone/nanomorph"></script>
<script src="https://wzrd.in/standalone/bel"></script>
<script>
nanomorph(document.body, bel`
  <body>
    <h1>it works!</h1>
  </body>
`)
</script>

https://jsfiddle.net/z5w7t3ow/

Thanks.