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

usage as a library doesn't work as expected #43

Closed
cachrisman opened this issue Mar 30, 2017 · 2 comments · Fixed by #44
Closed

usage as a library doesn't work as expected #43

cachrisman opened this issue Mar 30, 2017 · 2 comments · Fixed by #44
Assignees
Labels

Comments

@cachrisman
Copy link
Member

using the example given in the Readme:

var spaceExport = require('contentful-export')
var options = {
  maxAllowedItems: 100,
  errorLogFile: 'filename',
  ...
}
spaceExport(options)
.then((output) => {
  console.log('space data', output)
})
.catch((err) => {
  console.log('oh no! errors occurred!', err)
})

only returns space data undefined.

It seems the tool should know when it is being run as a library and directly return the data rather than write it to a json file.

@Khaledgarbaya
Copy link
Contributor

Hey @cachrisman @axe312ger will take care of this asap

@Khaledgarbaya
Copy link
Contributor

This is now fixed in #44 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants