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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow async getJSON (& adapt saveJSON) #59

Merged
merged 1 commit into from
Apr 30, 2017

Conversation

flying-sheep
Copy link
Contributor

why not go the whole way with promises?

this way we don鈥檛 force people (e.g. me 馃槢) to use sync variants of IO functions.

src/saveJSON.js Outdated
writeFile(
`${ cssFile }.json`,
JSON.stringify(json),
e => e ? reject(e) : resolve());
Copy link
Owner

Choose a reason for hiding this comment

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

It can be useful to resolve the promise with the received json. Could you please make this?

@madyankin
Copy link
Owner

@flying-sheep, great! I'll merge this today or tomorrow (on my phone right now). Thank you!

@madyankin
Copy link
Owner

@flying-sheep could you also fix the failing tests please?

@flying-sheep
Copy link
Contributor Author

OK, done!

@madyankin madyankin merged commit f15ec33 into madyankin:master Apr 30, 2017
@madyankin
Copy link
Owner

@flying-sheep published

@flying-sheep flying-sheep deleted the getJSON-promise branch April 30, 2017 19:58
@flying-sheep
Copy link
Contributor Author

thank you!

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