How to run and test locally?
See original GitHub issueThis issue is created in response to https://github.com/LeaVerou/color.js/issues/54#issuecomment-703844158.
I’m not sure it is a bug as much as maybe a question. How can one quickly run and evaluate this project locally? Coding up a web environment is surely possible, and one could import the code and test, but when it mentioned you could install via npm, I found that an attractive option as I was looking more to debug issue #50
-
Tried to install via the documentation’s recommendation for node, and the package isn’t found in the registry, so maybe that is outdated.
-
Tried to install by using the git repo, seemed to work, but couldn’t figure out how to import it. Seems it is an ESM module as it complained about
import
? Struggled to figure out when I couldn’t load it. Googled some things and tried to load it as an ESM module, but only ran into other complaints.
Maybe all that is needed is a little documentation for the less knowledgable like me 🙂.
I’m on node.js v14.4.0.
Issue Analytics
- State:
- Created 3 years ago
- Comments:34 (26 by maintainers)
Top GitHub Comments
Thanks for the nudge! Just published it: https://www.npmjs.com/package/colorjs.io
Let us know how it goes!
Btw, if you’re using it to parse CSS colors, please note that hex colors and color keywords are not yet parsed in Node (as they depend on browser APIs for parsing). We do plan to change that.
Changing the above, mentioned lines fixes @kripod’s issues: