choojs / nanomorph

🚅 - Hyper fast diffing algorithm for real DOM nodes
MIT License
726 stars 58 forks source link

usage without require/module manager #95

Closed sido420 closed 6 years ago

sido420 commented 6 years ago

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.

goto-bus-stop commented 6 years ago

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/

sido420 commented 6 years ago

Thanks.

AlbanMinassian commented 3 years ago

try https://bundle.run/nanomorph@5.4.2 alse