Comments (3)
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 :)
from gulp-html-replace.
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!
from gulp-html-replace.
I merged your PR, thank you. I'm a gonna update the readme and publish the new version.
from gulp-html-replace.
Related Issues (20)
- Incorrect string replacement more than one source HOT 1
- Incorrectly deleting build blocks HOT 2
- Support useref like blocks HOT 2
- newline under comment block inserted with keepBlockTags: true
- Concat and replace files HOT 3
- Comment Out a replace
- Check if input file is HTML? HOT 2
- newline added to block when 'keepUnassigned' and 'keepBlockTags' are true
- Add custom tag option HOT 4
- Add Closure to manipulate the data
- After `yarn add` none of dependencies is installed
- [Enhancement] Add support of one-string placeholders
- Allow for tasks with special characters in name
- Conditional Replacement
- Not keeping the order of my CSS ?
- Support for Jade/Pug files
- How to find only file name and replace without modify the entire path HOT 3
- resolvePaths on true and change root folder
- The path is not replaced
- Treats JS script like a url to JS script HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-html-replace.