-
Notifications
You must be signed in to change notification settings - Fork 46
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
Publish on npm #14
Comments
Feel free to submit a pull request and a means of testing and I am happy to merge this into the project. |
PR: |
BAM! https://www.npmjs.org/package/d4 |
sweet. Testing things on my end now. |
Was looking at this with @jefffriesen, looks like this won't quite do it, since each of the files in src refer to d4 as though it's a global... if you'd consider it, we could look at moving a few things around so it refers to the correct d4 object when built. |
@tgriesser @jefffriesen that sounds great to me as long as the composabilty of the library remains. Honestly, I'd like to refactor base.js into a series of smaller modules at some point too so maybe this would be a good first step. So consider this +1 from me! |
Any progress on this? I'm hoping to use d4 with browserify in a project. |
@nsonnad happy to consider pull requests for this feature, but i've been working on other aspects of d4 at the moment. |
Cool, I'm hoping to prepare a PR for this. Do you have some guidance as to how to refactor |
@nsonnad sorry for the late reply I wanted to think it over before responding. In general the only thing I'd like to ensure is that at some point we can pull the requisite parts away from base.js and make it a plugin style model. Right now d4 is a ball of features and parsers but as things grow i expect users will want to just choose the charts they are interested in. This was my main approach in claiming a global namespace early on. If you can continue to support this long term goal with the reorganization needed to make it work inside browserify I am all for it! Please let me know if you need any help, or have questions about the codebase I am more than happy to ride shotgun on this with you. |
I've made a browserify branch now off of master https://github.com/heavysixer/d4/tree/browserify |
Thanks @heavysixer. I did plan on working on it at some point in the next couple of weeks. I've done some initial work but it was mainly just me orienting myself with the library, nothing too helpful. I'll keep an eye on the progress in that branch and suggest ways I can help out as you go. How does that sound? |
@nsonnad this sounds perfect, thanks for doing that. |
We've completely moved our client-side dependencies from Bower to npm and use Browserify for dependency management. Browserify allows you to include npm modules on the client. It's great.
There are ways to include Bower modules within Browserify. Debowerify works sometimes but can cause conflicts depending on what other transforms you have.
For reference for others coming here, this is a way to get d4 workings within Browserify:
Then you can require it in your modules:
But it's really nice to just be able to do this and be done:
The text was updated successfully, but these errors were encountered: