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

Support selective module loading #41

Open
daedalus28 opened this issue Mar 10, 2016 · 2 comments
Open

Support selective module loading #41

daedalus28 opened this issue Mar 10, 2016 · 2 comments

Comments

@daedalus28
Copy link

First, excellent work on this - it's saved me a fair bit of time and I really appreciate that. We're using your popover binding, but can't load in everything else because we have some conflicting utilities. We also have a custom template engine in place (for the amd-helpers) as well as our own version of the string template engine, so it would be tricky to try to include the whole library. Right now, we've pasted it (along with the utils) into a file but I would much prefer to require this in directly. It would be great if there was some way we could require in just the things we need like the popover binding. Perhaps you could write each file as its own AMD module so they could be required directly?

Alternatively, some sort of config option to alias or namespace the bindings might also work, but we'd still need a way to opt out of the template engine.

@daedalus28
Copy link
Author

Another alternative might be to put each thing behind a set of initialization functions like https://mbest.github.io/knockout.punches/ does. You could have one for each binding and convenience once that include them all, etc.

@faulknercs
Copy link
Owner

Thank you for your comment!
I have thought about 2.0 version, which will provide each binding as umd module.
Also it may allow usage of some initialization options to customize binding namespace, if you want include all of bindings.

I have already made some experiments with this, so when I will have enough time, I think, I implement this feature.

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

No branches or pull requests

2 participants