aigle icon indicating copy to clipboard operation
aigle copied to clipboard

Suggestion: Split up core and features

Open alexgorbatchev opened this issue 8 years ago • 4 comments

This looks very impressive 👍 I suggest splitting out Promise spec implementation and additions into separate modules so that the Promise could just be used as a polyfill.

alexgorbatchev avatar Oct 31 '17 17:10 alexgorbatchev

@alexgorbatchev Thank you very much for the suggestion and the comment! 😄 Would you like to use the Promise core functions or the features with another Promise library (or the native Promise)? 🤔

suguru03 avatar Oct 31 '17 18:10 suguru03

Both would be ideal IMO. I don't know what level of effort it would be.

alexgorbatchev avatar Oct 31 '17 18:10 alexgorbatchev

Another alternative would be to use ES5 import/export. This would allow tree shaking during minimization and essentially accomplish the same thing. Now that I think of it, it's probably the right thing to do in the first place.

alexgorbatchev avatar Oct 31 '17 18:10 alexgorbatchev

I have never thought about tree shaking, it is really a good idea! I will learn how to make it the separate modules. If you could help me, I would be happy. 😄

FYI, The features rely so much on Aigle because of optimization, they won't be compatible with another Promise library. Therefore, I'm also making a library which supports extending a Promise library to have the same features as Aigle. We may be able to apply the idea to it as well.

suguru03 avatar Oct 31 '17 19:10 suguru03