New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modularize? #8
Comments
I did this for |
:) funny, I've actually filed this issue because I needed to import |
I went ahead and did this myself for |
Thank you. Sorry for not letting you know – I realized that I just needed the pubsub part, and that I needed more power. So I went ahead and wrote another library: stereo. It’s like |
No worries, I kinda needed it anyways :) |
λ
aims to be modular and browser-friendly. How about releasing every function as a separate script? This goes right in hand with “Methods are implemented individually and not as part of a whole.”Here’s why: when you just want one or two
λ
functions, you still have to pull the whole source ofcontra
into your bundle:3 kB minified code isn’t much – but it matters when you write a browser-facing app or library. It would be much better if you could just get the 300 bytes you really need:
Here’s how: tjmehta/101 is a great example of such an approach.
You can also keep full backwards compatibility with the current syntax –
var concurrent = require("contra").concurrent
– by supplying an index.js like this one. This index.js could then also be compiled into a drop-in bundle for browsers. Just as it is now.The text was updated successfully, but these errors were encountered: