IjzerenHein / kiwi.js

Fast TypeScript implementation of the Cassowary constraint solving algorithm 🖖
Other
249 stars 24 forks source link

Compilation failure using library under typescript due to missing `thirdparty` folder #6

Closed adamhaile closed 5 years ago

adamhaile commented 5 years ago

I'm trying to use kiwi.js in a typescript project and can't get it to compile. The issue is that lib/kiwi.d.ts references ../thirdparty/tsu.d.ts, but the whole thirdparty folder isn't included in the npm package, causing a compilation failure.

As a suggestion, the namespace system of code organization the lib uses is largely deprecated for external libraries in favor of the ES6-style module import/export statements. It would be great if the lib could be updated to use the module system. It doesn't look too complicated if you're interested in a PR.

IjzerenHein commented 5 years ago

Hi Adam. Yes I see what you mean, thanks for reporting. Yes I'd be very much interested in a PR for this. I am aware the TS structure needs to be updated but I've had no time to work on this project. Appreciate it!

adamhaile commented 5 years ago

Yeah, let me see what I can do.

Would you be OK with using rollup to assemble the lib rather than grunt? I find rollup works really well with libs produced from es6 modules.

IjzerenHein commented 5 years ago

Hi, would this be fixed now with the new v1.1.0 release which contains your PR #7 and PR #8? cheers, Hein

adamhaile commented 5 years ago

Yep, TS builds work fine now. Closing.

BTW, thanks for the merge, and sorry for taking a while to get back!