Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey @kcartlidge!
I've updated the api to be asynchronous. Test are be passing 👍.
Changes
nodepub.document
: It was previously doing a synchronous check for whether the cover exists. I've removed that check to instead check that something is provided. Leavingnodepub.document
as synchronous seemed like a good idea for backwards compatibility.nodepub.getFilesForEPUB
: Now includes an argument for a callback. Throws if no callback is provided. I'm using the npmasync
module to make reading all the files easier.nodepub.writeFilesForEPUB
: Accepts a callback. Throws if no callback is provided. Returns an error if something goes wrong...makeFolder
: Helper method is also now asynchronous. It returns an error in the case where it previously threw.README.md
: Updated with the api changes..editorconfig
to stop my editor from adding different types of spacing. Should be consistent with the previous style..eslintrc
to catch little errors.npm test
command to show errors happening. Jasmine wasn't always reporting when things went 💥.package.json
version to signify the breaking change.That should be about it! You can give it a test with your setup and make sure all is well.
Let me know if there's any changes necessary. This seems to be working with my stuff though :).
Thanks!