choojs / choo

:steam_locomotive::train: - sturdy 4kb frontend framework
https://choo.io/
MIT License
6.78k stars 595 forks source link

Use choo directly in the frontend #671

Closed fredoist closed 6 years ago

fredoist commented 6 years ago

Is there any way to use choo directly in the frontend without npm?

I mean something like:

<script src="dist/choo.js"></script>
<script>
  // You can use choo now
  var app = choo();
  // app.something() ...
</script>
YerkoPalma commented 6 years ago

choo and nanohtml includes umd builds. I have set up a minimal example in codepen here.

The key is to refer the bundle files in the dist folder https://unpkg.com/choo/dist/bundle.js (notice that there is also a minified bundler version there)

fredoist commented 6 years ago

It works!

Thank you @YerkoPalma