jotform / css.js

A lightweight, battle tested, fast, CSS parser in JavaScript
https://medium.com/jotform-form-builder/writing-a-css-parser-in-javascript-3ecaa1719a43
MIT License
426 stars 63 forks source link

add npm support #1

Closed kemaldaggen closed 6 years ago

RamonGebben commented 9 years ago

This can be done very easily. Want a PR for this or do you wanna explore that path yourselves? Consult this guide to help you on your way

kemaldaggen commented 9 years ago

If you feel like, please be our guest and send a pull request. We are open to contributions. :)

We solely use this in browser environment, but I thought that it might come handy for some other purposes to parse CSS in node. So I created this issue :)

RamonGebben commented 9 years ago

I could send a PR when I made the repo ready, but you would need to run the npm publish since it's your code man ;) And a node version does exist.

I read the article about the development process and now I'm think you could have just sent it to node and let it return the JSON object via AJAX and use that library to do what you wanted.

But then again I prefer client side so thanks for making this. :)

ctsstc commented 6 years ago

I would love to include this in my webpack, I know right now I could include the git repo in my project, but it would be nice to have it up on npm since npm cli seems to have some oddities with uninstalling git resources currently. I would also love to see this in ES modules.

eeertekin commented 6 years ago

Hey @ctsstc,

NPM module is published

https://www.npmjs.com/package/jotform-css.js