Comments (14)
Thanks for the suggestion @itrelease think this is great! I'm busy re-writing this using es6 but think it might suit typescript a lot more, (personally flow is abit, ify).
from hyperapp.
@maraisr I'm sorry, but I'm not going to make HyperApp three times larger just so that we can use ES6 in the source code.
EDIT: In retrospect, the comment above was pretty ignorant.
from hyperapp.
@maraisr Interesting. Let's continue the webpack discussion #29.
By the way, in real production environments, users will use https://www.npmjs.com/package/yo-yoify to transform html
templates into raw h
calls or babel to transform JSX into raw h
calls.
So, we still need to provide each module html/app/h (and possibly toString in the future) separately.
from hyperapp.
Hi,
Going back to the eslint issue I would go with standard
because it's really easy to setup, has no configuration and, above all, your code is almost standard, so the changes are minimal. If you agree, I'll make a PR
from hyperapp.
For eslint (so that unix/windows/linux devs) can avoid errors because of their OS (if using the airbnb style guide):
"rules": {
"linebreak-style": "off",
}
from hyperapp.
I'd be willing to give flow a try, since we use it at work too, but I don't know if it'd be really worth it for a project this size.
As for eslint, I think it'd be futile, since HyperApp is mostly written in ES3 with some ES5 bits here and there. Also, I don't fancy the idea of upkeeping an .eslint file.
I'd be willing to give https://github.com/feross/standard a try though!
from hyperapp.
@maraisr Why are you rewriting HyperApp in ES6?
from hyperapp.
@jbucaran purely for developer experience. Webpack, Vue, React all the majors all wrote their source files in es2015 and there is a great reason for it too.
The people using the CDN through raw git, use the es3/5 compatible builds through that webpack offer. My es2015 build has babel.
In terms of the standard, yeah anything is fine. Feel like with you @jbucaran being the product owner you should be setting the code standard you're comfortable with. SO if you want that standard imposed, yeah sure.
from hyperapp.
@maraisr Don't get me wrong. I don't fancy ES3 neither. Many of the HyperApp examples posted in the README use a quite aggressive and modern JavaScript.
How much does the new bundle differ in size with the current bundle?
from hyperapp.
@jbucaran really good build is 3.4kb gziped, and like 8 ungzipped. With webpack, we get tree shaking so I'd imagine the this is quite a lot smaller than the browserfy individual module build we had going before.
from hyperapp.
Its not 3x the size, remember this contains all the code for app
, h
and html
including its dependencies. And just not that this bundle right now isn't es6. Will be significantly smaller smaller once es6 kicks in.
from hyperapp.
which is 3988 bytes + 1089 bytes + 6493 bytes, so 11570 bytes, which is 11.5Kb.. Webpack wins.
from hyperapp.
@danigb Yeah, maybe.
I'm trying to migrate to rollup (that's if we manage to make it create smaller bundles). You can go ahead and send a PR and we'll get to it eventually.
Thanks!
from hyperapp.
Nothing actionable we can do here. Don't really think HyperApp needs either one.
That's not to say I don't recommend using them in your application. That'd be most fine. But HyperApp is tiny and okay without it.
from hyperapp.
Related Issues (20)
- JSX fails if no props are given HOT 6
- A way to insert raw Html HOT 1
- TypeError: can't access property 0, newSubs is null, when setting the state to undefined. HOT 4
- Issue with null-vnodes HOT 1
- prevent rerender node HOT 2
- The dispatch initializer ends in an endless loop on init when dispatching any action HOT 7
- Injected classes gets removed when using object/array to define class props HOT 1
- hyperapp version HOT 3
- Memo Data Gotcha HOT 5
- Confusing doc for actions -> wrapped actions HOT 5
- Passing arguments to init HOT 4
- [Question] Headless mode is still possible? HOT 1
- Destroying a child app HOT 8
- @hyperapp/html: use a Proxy? HOT 9
- Actions returning other Actions HOT 5
- Compile template tag to hyperscript HOT 17
- A challenge to hyperapp community HOT 1
- Has 2.0 been dropped from development? HOT 3
- oldSub[2] is not a function HOT 3
- Cannot read properties of null (reading 'length') HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hyperapp.