markusn / color-diff

Implemets the CIEDE2000 color difference algorithm, conversion between RGB and lab color and mapping all colors in palette X to the closest color in palette Y based on the CIEDE2000 difference.
Other
359 stars 30 forks source link

Migrate to ES6 #12

Closed valmynd closed 7 years ago

valmynd commented 7 years ago

Hello,

I did a port to ES6, maybe you're interested in taking over the changes. I'm sorry that I did a lot of reformatting, that makes up a bulk of the changes in the diffs...

The tests are running fine, I don't know if I should've added the dist-folder to the .gitignore-file?

Anyway, thanks for your awesome implementation of CIEDE2000!

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.7%) to 100.0% when pulling cb809b8b40c091220851bf548039681d95dc4a4b on valmynd:master into ad7d2da284546078abeee52dbf5fe3fc421f31ac on markusn:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.7%) to 100.0% when pulling ebf22f13751d892c5de8dbc1f6def0410b3b5a00 on valmynd:master into ad7d2da284546078abeee52dbf5fe3fc421f31ac on markusn:master.

markusn commented 7 years ago

Hi! Thanks for the PR, I will have a look at it when I get the time (this week is a bit busy). As you already stated the dist folder should not be part of the git-repo (it should be in the .gitignore file) as it is a build artifact (this should be fixed before the PR is accepted).

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.7%) to 100.0% when pulling 2b7b52e983c2de0328eb295f22192373e4043183 on valmynd:master into ad7d2da284546078abeee52dbf5fe3fc421f31ac on markusn:master.

markusn commented 7 years ago

I've tried to have a look at the diff, however it is very hard due to the fact that most of the changes is reformatting, shadowing the actual changes related to ES6. The reformatting should be removed, it makes it hard to review and does (in my opinion) not add any benefits.

The structure of the files also changed: the structure used in the source files should be divided into sections in the following order: imports/exports, followed by the definitions of exported functions, followed by internal functions. This structure is there for a good reason: when examining a source file it should be immediately obvious which imports and exports it has and after that the interesting (public) functions should be defined (followed by the uninteresting internal functions).