Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove es6-promise dependency #88

Merged
merged 3 commits into from
Aug 26, 2015
Merged

Conversation

nathanboktae
Copy link
Contributor

A promise implementation must be specified as an option now if no global Promise implementation exists.

…ion to be defined as an option, defaulting to the global Promise
@@ -36,10 +36,15 @@ Cherrytree.prototype.initialize = function (options) {
this.middleware = []
this.options = _.extend({
interceptLinks: true,
logError: true
logError: true,
Promise: window.Promise
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to do smth like typeof window === 'undefined' ? global.Promise : window.Promise to continue supporting node env.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specifically the node env support is just during webpack right? Then global.Promise should be fine. Also the actual webpack command should run in CI to catch this :)

@KidkArolis
Copy link
Contributor

Will try to sort out those travis builds a bit later.

@nathanboktae
Copy link
Contributor Author

Will try to sort out those travis builds a bit later.

There's nothing to sort out unfortunately. Travis does not export secure env vars on pull requests for security reasons, so PR builds will always fail.

@nathanboktae
Copy link
Contributor Author

I added my own saucelabs credentials on my fork and you can see the build passing

@nathanboktae
Copy link
Contributor Author

Also fixes #85, ref #69.

@@ -36,10 +36,13 @@ Cherrytree.prototype.initialize = function (options) {
this.middleware = []
this.options = _.extend({
interceptLinks: true,
logError: true
logError: true,
Promise: global.Promise
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat, I didn't realise this would work in all envs (browser and node) with the help of webpack

KidkArolis added a commit that referenced this pull request Aug 26, 2015
Remove es6-promise dependency
@KidkArolis KidkArolis merged commit 5d97c0d into QubitProducts:master Aug 26, 2015
@KidkArolis
Copy link
Contributor

Thanks for this one!

Fyi, I've added 2 extra commits on top of this:

41d3bd4
083a5b9

Will release as alpha.12 shortly

@KidkArolis KidkArolis mentioned this pull request Aug 26, 2015
Closed
@nathanboktae
Copy link
Contributor Author

Cool thanks! Didn't know about co.wrap, nice.

@nathanboktae nathanboktae deleted the byop branch August 26, 2015 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants