words / color-description

Color-Description turns a technical color representation into a human readable description.
https://words.github.io/color-description/
MIT License
61 stars 6 forks source link

Fixed tests #6

Closed nico-martin closed 3 years ago

nico-martin commented 3 years ago

To fix the tests I had to do some refactoring: index.js has to be a es6 module (import/export). That's why I created a ui.js with the JavaScript for the ui that imports the index.js. I then had to change the esbuild so it builds a "browser-compatible" version (no import/export) Now the tests can import the index.js and run as expected.

meodai commented 3 years ago

sorry I was working on this already. Please have a look at what I did. (The files that are generated + package.json main section) to see if you think that it makes sense. I'd rather now have the demo js file in another file, since I want it to be as easy as possible to understand.

Would love to hear your feedback.