mondora / asteroid

An alternative client for a Meteor backend
MIT License
734 stars 101 forks source link

Consider using Promiz instead of Q #67

Closed dandv closed 8 years ago

dandv commented 9 years ago

Promiz is much smaller, Promise/A+ compatible, and written by a super smart guy. It's also used by Webix.

This would shave off 50KB!

pscanf commented 9 years ago

Hey @dandv,

I took a look at promiz and tried testing it with this promise test suite, but it doesn't seem to be compliant.

Actually I was considering using es6-promise, which is also much smaller than Q and seems to be embedded in a lot of libraries. What do you think of it?

Thanks (and sorry for taking so long to reply!)

dandv commented 9 years ago

Interesting. I was thinking @Zolmeister addressed that with https://github.com/Zolmeister/promiz/issues/2#issuecomment-31632489.

I've seen es6-promise recommended as the polyfill, so it should be a good choice.

Zolmeister commented 9 years ago

Either option is fine. Promiz is 0.89kb (min+gz), while es6-promise is 2.13kb (min+gz) As for running the Promiz tests, npm run all should do it (package.json)

pscanf commented 9 years ago

Ah I see, I guess I run them against the "unadapted" version, my bad, sorry.

Very well then, I might be able to do something about it tomorrow, as I need to do some long due refactoring before including it in a new project I'm working on.

I'll keep you posted :smiley: Cheers

tomByrer commented 9 years ago

I would slightly prefer a more universal ES6 promise, but doesn't matter too much.

pscanf commented 9 years ago

At the end for 1.0.0 I went with the polyfill included by babel.

dandv commented 9 years ago

How about for asteroid.chrome.js? Chrome has Promise support in its ES6 implementation.

pscanf commented 8 years ago

I published 2.0.0 a few days ago, and getting around solving some issues. :smiley:

2.0.0 assumes there's a Promise global class available. So well, it shouldn't be a problem polyfilling (if necessary) it with whatever library one prefers, be it promiz or babel's one.

Cheers :smiley: