-
Notifications
You must be signed in to change notification settings - Fork 22
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
Browserified npm modules #34
Comments
I don't think we will provide specific Browserify task, but I'm thinking about creating general npm task. |
There is a boot-npm task that could be extended to support these use cases |
npm task is tracked here: #39 |
New |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are lot of JS libraries that are written to only work with browserify (such as snabbdom). There is a CDN called wzrd.in for browserify modules, but it's poorly implemented. I've barely used it and I've had multiple issues with it. It doesn't support peer dependencies (which motor/cycle needs) or choosing the entry point (which snabbdom needs). It also doesn't bundle the way browserify does, it just concatenates multiple standalone bundles, which can result in unusual behavior, and the author made it clear that he doesn't want to fix it.
I propose having a
browserify
boot task that can make the process of including those libraries simpler.Node, npm and browserify would be installed on the CLJSJS end. Then the task would just install the package and run the globally installed browserify task with the given params, so it shouldn't be too hard to implement.
The task can take in the browserify optional and required parameters: entry points, the UMD module name, and output file (see usage).
For example:
Which would do this under the hood:
Then it would be easy to include browserify modules like snabbdom, by just running the
browserify
task for all of the entry points/submodules it provides (class, props, style, events, and h), concatenating and miniftying it, and the you're done.The text was updated successfully, but these errors were encountered: