3 ms·
If you grab hyperapp from the CDN https://unpkg.com/hyperapp@latest https://unpkg.com/hyperapp@latest, you'd use it like this: > const { h, app } = hyperapp I
by jbucaran 9y ago
If you grab hyperapp from the CDN https://unpkg.com/hyperapp@latest https://unpkg.com/hyperapp@latest, you'd use it like this:
> const { h, app } = hyperapp
If you setup a simple build pipeline using npm/yarn + browserify you would instead:
> const { h, app } = require("hyperapp")
And if you compile your app with babel using babel-preset-es2015, etc., then you can use the ES6 import syntax.
===
Here are some gists to help you on your journey:
- hyperapp + hyperx + rollup minimal boilerplate https://gist.github.com/jbucaran/fac2c3de24e5171596fb189f9c1feb8e https://gist.github.com/jbucaran/fac2c3de24e5171596fb189f9c1...
- hyperapp + hyperx + webpack minimal boilerplate https://gist.github.com/jbucaran/c6a6bdb5383a985cec6b0ae4ebe5a4b1 https://gist.github.com/jbucaran/c6a6bdb5383a985cec6b0ae4ebe...
- hyperapp + jsx + rollup + buble minimal boilerplate https://gist.github.com/jbucaran/f714dd6d64041591e5e53dbff8558439 https://gist.github.com/jbucaran/f714dd6d64041591e5e53dbff85...
- hyperapp + jsx + rollup minimal boilerplate https://gist.github.com/jbucaran/0c0da8f1256a0a66090151cfda777c2c https://gist.github.com/jbucaran/0c0da8f1256a0a66090151cfda7...
- hyperapp + jsx + webpack minimal boilerplate https://gist.github.com/jbucaran/6010a83891043a6e0c37a3cec684c08e https://gist.github.com/jbucaran/6010a83891043a6e0c37a3cec68...
- hyperapp + hyperx + browserify minimal boilerplate https://gist.github.com/jbucaran/48c1edb4fb0ea1aa5415b6686cc7fb45 https://gist.github.com/jbucaran/48c1edb4fb0ea1aa5415b6686cc...
- hyperapp + jsx + browserify minimal boilerplate https://gist.github.com/jbucaran/21bbf0bbb0fe97345505664883100706 https://gist.github.com/jbucaran/21bbf0bbb0fe973455056648831...