-
Notifications
You must be signed in to change notification settings - Fork 31
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
Allow for multiple variables in template #13
Comments
Hi Nicolas. This is actually a very good point. I'm thinking about something like this: rjs: {
src: ['data-main.js', 'require-src.js'],
tpl: '<script data-main="%s" src="%s"></script>'
} for single tag replacement and: rjs: {
src: [['data-main.js', 'require-src.js'], ['script.js', 'script2.js']],
tpl: '<script data-main="%s" src="%s"></script>'
} for multiple for continuity's sake. If that's ok for you then i'm gonna add this in the future versions of the plugin. Will try to sort this all out as soon as i can :) |
That would be perfect, I did not think about that multiple case - and I guess that's what tripping me up trying to implement this myself... It keeps adding multiple entries in the generated HTML. If I do end up to get this working OK, I'll ensure to submit a PR. Thanks! |
I merged your PR, thank you. I'm a gonna update the readme and publish the new version. |
Hi,
This is kind of related to issue #1. We are using RequireJS on a website and need to modify 2 attributes in our
script
tag:data-main
andsrc
.Would something like this fit in your vision of the plugin (allowing to pass an array or replacement when using a template) ?
Cheers
The text was updated successfully, but these errors were encountered: