mozilla / reflex

Functional reactive UI library
MIT License
367 stars 20 forks source link

Bundled, minified distribution without node dependency? #45

Closed gordonbrander closed 8 years ago

gordonbrander commented 8 years ago

Is it possible to create a bundled flat file that you can link in with a simple <script> tag? The goal would be to avoid Node/babel dependency for development.

Gozala commented 8 years ago

@gordonbrander that's the case for bundles that we push onto gh-pagse branch: https://github.com/browserhtml/browserhtml/tree/gh-pages

See: https://github.com/browserhtml/browserhtml/blob/gh-pages/index.html https://github.com/browserhtml/browserhtml/blob/gh-pages/components/browser/index.js

If you mean to kill node / babel dependency even for development, I think there's lot's of tradeoffs we would have to make for that & at the end of the day we would still probably need to bundle & minify for deployments.

gordonbrander commented 8 years ago

@Gozala this is more for my own selfish reasons... I would love to use Reflex in a Python project that doesn't have node as a dependency.

gordonbrander commented 8 years ago

I think what I'm actually asking is this: can Babel create a bundled script file that exports modules to the global namespace? Will investigate.

Gozala commented 8 years ago

@gordonbrander oh I did not realize this was on the reflex repo :) But yeah you should be able to use reflex without babel or node dependencies. When I publish to npm it generates a dist/reflex.js file that you could just include via script tag.

Gozala commented 8 years ago

@gordonbrander so only tricky thing is you'd have to download that generated file from somewhere, like npm which you can totally do.

I would not be opposed to attaching bundled reflex.js files to releases on github: https://github.com/Gozala/reflex/releases

If that is interesting to you, I'm happy to add you as a collaborator and let you help me with that.

gordonbrander commented 8 years ago

@Gozala yup, I would love to do that.