-
Notifications
You must be signed in to change notification settings - Fork 15
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
add a global config #11
Comments
Hi Paul Your first point is already available, although a global config could be a better way of doing it. The These 2 options are available using the cli too. I like the idea of the 2nd point, I use the superviewify browserify transform so I don't really get affected but I see how it could be useful nd I'll look into it. Cheers Dave |
Yes, I had noticed the signature. However I see that more like a way to override some general configuration. That is, at the beginning the user would be able to set the default argument string and wouldn't have to care about it anymore. Then, if for some particular template there's a need for other arguments, it could be done directly in the call to
I'm curious: so how does the compiled idom template finds the incremental dom function? How do you inject |
It gets injected by the transform. Browserify then bundles is like this Have a look here to see some examples.
This would be nice
More often than not, I find this is the case. Again see this project, it's how I have been using superviewify and structuring code using browserify. I'm still working out some things about where controller, models and such like live but it's working ok so far. |
It makes sense to be able to set some global options. Two concrete examples that I encountered:
If the user prefers to use
ctx
as argument (for instance) instead of the defaultdata
, it is necessary to wrap the superviews template with<template>
:If this was a config option, the user could simply do:
Currently superviews is calling the idom functions directly:
If the user is including incremental dom via a browser script, it is easier to reference the functions from the "IncrementalDOM" object that is exposed globally
The text was updated successfully, but these errors were encountered: