News for hackers. Stuff that matters.
Re:Show HN: 1kb JavaScript library for building front end ap... by jancsika on Sunday June 25, 2017 @04:39PM (#14632043)
> Or you can use ES6/ES5 by setting up a build pipeline.

> import { h, app } from "hyperapp"

I might be misunderstanding here, but isn't `import` unavailable in ES5? (I.e., just a future reserved word?)

Re:Show HN: 1kb JavaScript library for building front end ap... by jbucaran on Sunday June 25, 2017 @04:47PM (#14632081)
If you grab hyperapp from the CDN 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/fac2c3de24e5171596fb189f9c1...

- hyperapp + hyperx + webpack minimal boilerplate https://gist.github.com/jbucaran/c6a6bdb5383a985cec6b0ae4ebe...

- hyperapp + jsx + rollup + buble minimal boilerplate https://gist.github.com/jbucaran/f714dd6d64041591e5e53dbff85...

- hyperapp + jsx + rollup minimal boilerplate https://gist.github.com/jbucaran/0c0da8f1256a0a66090151cfda7...

- hyperapp + jsx + webpack minimal boilerplate https://gist.github.com/jbucaran/6010a83891043a6e0c37a3cec68...

- hyperapp + hyperx + browserify minimal boilerplate https://gist.github.com/jbucaran/48c1edb4fb0ea1aa5415b6686cc...

- hyperapp + jsx + browserify minimal boilerplate https://gist.github.com/jbucaran/21bbf0bbb0fe973455056648831...