Comments (4)
Well, it is not a bug, is a "feature" of replace()
. It seems that $&
is a special character that is used to use the searched string into the substitution string (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace).
I'm trying to see how to solve it. An easy fix would be to use something like str = str.split(match).join(replaceWith);
. Not efficient, but would work.
from gulp-include.
I have sent #5 with this fix. If you find something better, please forget my code 😄
I'll leave this issue opened until a decision has been made.
from gulp-include.
Ha! Good catch. That's very odd indeed.
One note on your gulpfile, you only need to run include() once:
gulp.src("app.coffee")
.pipe(include())
.pipe(coffee())
Since the javascript is within the backsticks the coffeescript compiler will not touch it.
Edit: I see now that you probably are doing this approach due to the bower-implementation having backticks... That's a shame...
from gulp-include.
That's right, Bower jQuery version has comments with backticks, that's why I have to do the includeCoffee-CompileCoffee-IncludeJS process 😉
Closing this issue now since #5 has been merged.
from gulp-include.
Related Issues (20)
- Ability to control syntax HOT 2
- Error preventing run HOT 2
- Pre and post processing
- Variables not scoped properly HOT 3
- gulp-include and eslint and proper line numbers? HOT 1
- processInclude processes output file indefinitely (or until the stack explodes) HOT 1
- Require Behaviour HOT 2
- Compile before include
- Gulp include breaks the code on windows system HOT 1
- Add "include-if-exists" functionality
- how do I to insert file conten inside quotation marks? HOT 2
- Replace deprecated dependency gulp-util HOT 1
- Independent require in several files HOT 5
- Possibly remove/lock event-stream HOT 1
- gulp-util removal request HOT 2
- Anyone know of a good alternative? HOT 13
- When multiple files are matched, it includes both of them. HOT 7
- TypeError: resultMap.eachMapping is not a function HOT 5
- Question about src/js/main.js
- Any way to use sourcemaps and minification of files?
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-include.