lmgonzalves / segment

A JavaScript library to draw and animate SVG path strokes
http://lmgonzalves.github.io/segment
MIT License
1.74k stars 99 forks source link

Usage through NPM? #3

Closed BenoitZugmeyer closed 8 years ago

BenoitZugmeyer commented 8 years ago

I would love to use this project in a small project of mine, currently built with webpack.

Using this project via NPM would require some changes, since the "main" entry point (dist/segment.js) isn't exporting any value. Would you consider either:

A new, trending way of distributing packages is to write ES6 code and add a "esnext:main" entry point in the package.json. This could be considered as well.

Also, for simplicity and visibility, it would be great to publish segment to the NPM registry.

lmgonzalves commented 8 years ago

Your suggestion is very welcome! I chose to create a new file (segment.node.js), as you suggested. I've also published segment to the NPM registry, so you can install it with:

npm install segment-js

I do not have much time right now, but soon I think also include support for bower. And add the instructions in the README file. Let me know how it works for you :)

BenoitZugmeyer commented 8 years ago

Thanks a lot, it works great. I don't have time to publish my usage of segment on github just yet though. Anyway, that's all I asked, let's close this!