Code Monkey home page Code Monkey logo

Comments (14)

maraisr avatar maraisr commented on April 27, 2024 2

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.

jorgebucaran avatar jorgebucaran commented on April 27, 2024 1

@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.

jorgebucaran avatar jorgebucaran commented on April 27, 2024 1

@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.

danigb avatar danigb commented on April 27, 2024 1

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.

selfup avatar selfup commented on April 27, 2024

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.

jorgebucaran avatar jorgebucaran commented on April 27, 2024

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.

jorgebucaran avatar jorgebucaran commented on April 27, 2024

@maraisr Why are you rewriting HyperApp in ES6?

from hyperapp.

maraisr avatar maraisr commented on April 27, 2024

@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.

jorgebucaran avatar jorgebucaran commented on April 27, 2024

@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.

maraisr avatar maraisr commented on April 27, 2024

@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.

image

from hyperapp.

maraisr avatar maraisr commented on April 27, 2024

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.

maraisr avatar maraisr commented on April 27, 2024

Current:
image

which is 3988 bytes + 1089 bytes + 6493 bytes, so 11570 bytes, which is 11.5Kb.. Webpack wins.

from hyperapp.

jorgebucaran avatar jorgebucaran commented on April 27, 2024

@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.

jorgebucaran avatar jorgebucaran commented on April 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.