gka / chroma.js

JavaScript library for all kinds of color manipulations
https://gka.github.io/chroma.js/
Other
10.08k stars 543 forks source link

readme.md lies about zero-dependency #283

Closed josch closed 3 weeks ago

josch commented 2 years ago

The readme states "Chroma.js is a tiny small-ish zero-dependency JavaScript library". This is not true as in package.json it lists a dependency:

  "dependencies": {
    "cross-env": "^6.0.3"
  }

Please remove the dependency or change the readme as appropriate. Thanks!

lcb931023 commented 2 years ago

cross-env is a dependency that makes it easier to build chroma.js. It's not a dependency of the library itself :)

You can read more about cross-env here

josch commented 2 years ago

It's not a dependency of the library itself :)

Yes it is. Read the package.json. Yes, this is probably a bug and the dependency should probably move to devDependencies but it isn't yet. So as of right now, due to this bug, chroma-js is not zero-dependency. Right now, everybody who installs (not builds) chroma-js will also need to install cross-env.

lcb931023 commented 2 years ago

I see what you meant. I’ve been using the minified file directly so zero-dependency just meant to me that the inner working of the library doesn’t rely on any other pieces of code, and it pulling cross-env when installed through a version manager wasn’t a problem for me.

Since the developer is taking a break from maintaining this library as noted in Readme, pull requests are unlikely to go through. I would recommend maintaining a fork of this lib, and pulling that through your choice of package managers :)

gka commented 3 weeks ago

cross-env has been moved to devDependencies, so chroma.js again is zero-dependencies :)