Open bgrins opened 6 years ago
Functional creation probably only doesn't work because typescript says its not callable.
I don't usually test against the dist directory, but you can. would need to change the order on travis to build first https://github.com/bgrins/TinyColor/blob/v2/.travis.yml#L6-L8
I realized that the functional creation does actually work in node as well, it just doesn't in the test when we import from
import TinyColor from '../src/public_api';
because I guess that's not compiling down to es2015, or something.This isn't landable since it will break tests if
npm run build
didn't happen first. But I'm now wondering though.. should we be testing against dist/ instead of src/? I could see a gap where all tests pass against src/ but there was a bug with the build / packaging itself and we shipped out a broken dist/? Or is that a narrow enough gap that it's not worth worrying about. @scttcper any thoughts? I'm not sure what's normally done with TS projects.