chroma.js icon indicating copy to clipboard operation
chroma.js copied to clipboard

readme.md lies about zero-dependency

Open josch opened this issue 2 years ago • 3 comments

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!

josch avatar Nov 01 '21 15:11 josch

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

lcb931023 avatar Nov 05 '21 09:11 lcb931023

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.

josch avatar Nov 05 '21 09:11 josch

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 :)

lcb931023 avatar Nov 06 '21 13:11 lcb931023