thisandagain / sentiment

AFINN-based sentiment analysis for Node.js.
MIT License
2.64k stars 311 forks source link

Bundle for browser usage? #129

Closed trainorpj closed 6 years ago

trainorpj commented 6 years ago

Nice work on this library! I found it helpful for one of my pet-projects, but when I tried to use it in the browser I saw you don't have a bundled version.

Have you considered using something like rollup to bundle you packages into a single deliverable?

trainorpj commented 6 years ago

I made a bundled version for my own use. You can check out my branch.

I made a few big changes, so I didn't want to submit a PR. I'm happy to discuss this further.

thisandagain commented 6 years ago

Hi @trainorpj. I think most folks generally use webpack or browserify to bundle sentiment into a front-end project. I'd be happy to accept a PR that adds some dev dependency(s) to enable having a standalone bundle for this purpose though.

trainorpj commented 6 years ago

Sure thing! I'll clean up my branch when I get a chance.

thisandagain commented 6 years ago

On reflection I'd prefer that folks use something like webpack or browserify if they would like to include this in a client-side application. This helps keep the complexity of this repo down and is fairly normative with the rest of the NPM ecosystem.