-
Notifications
You must be signed in to change notification settings - Fork 42
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
WIP: upgrade to latest sql.js #36
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really like the simplification!
src/index.js
Outdated
export { Exporter }; | ||
|
||
export default function(deckName, template) { | ||
export default function(deckName, template, sql) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about providing parameters via object?
export default function({deckName, template, sql}) {
We now have 3 params, and 1st and 3rd are required, which is a little odd.
Also, should we provide a default value for template
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @yakhinvadim, this does seem awkward as template
is optional. I do see an advantage for using object notation for method params. This could be a good pattern that other methods could benefit from, e.g. addCard
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially I didn't want to introduce breaking changes, but it totally makes sense. Thanks for insisting 👍
- [browser usage with media attachments via <form />](examples/browser-media-file-input) | ||
- [Node.js](examples/server) | ||
- [Browser/webpack/asm, with ajax and input media attachments](examples/browser) | ||
- [Browser/webpack/wasm, with ajax and input media attachments](examples/browser) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this link to examples/browser-wasm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I totally agree, we should leave it up the user as to which sql.js
implementation they want to use.
src/index.js
Outdated
export { Exporter }; | ||
|
||
export default function(deckName, template) { | ||
export default function(deckName, template, sql) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we throw an explicit error if sql argument is not defined? It would help people migrating from older code as it would fail loudly and clearly.
No description provided.