grunt-includes
grunt-includes copied to clipboard
Include in destination file between 2 tags
Let's say we have a target .js file with the tags
/* injector:tag */
//Maybe, nor maybe not some content
/* endinjector */
Is there a way to use regex to inject in between these tags. If there is already content between the tags, I would like to overwrite the content. I don't want the tags overwritten though.
I have tried
includes:{
myIncludes: {
options: {
includeRegexp: /\/* injector:tag *\/[\s\S]*?\/* endinjector *\//,
},
files: [{
src: '.tmp/soundTree.json',
dest: '<%= yeoman.client %>/treeTarget.js',
}],
},
},
But the entire target file gets over written by the source file. Any thoughts