Reputation: 41
I wish to copy some twig files while removing the 'src' suffix example: someCode.html.src.twig with the result : someCode.html.twig using gulp rename as I must have this change implemented for several files that all have the src suffix.
I also wish to maintain the directory structure:
example:
D: test --> formsDirectory --> someFile.html.src.twig , someotherFile.html.src.twig
--> SomeOtherDir --> onemore.html.src.twig
result: D: someDir --> formsDirectory --> someFile.html.twig , someotherFile.html.twig
--> SomeOtherDir --> onemore.html.twig
I know that I can use gulp rename to remove the extension and basename however I wish to only change the suffix are illustrated. Any Help would be Great! thanks
Upvotes: 1
Views: 1275
Reputation: 41
Use gulp-ext-replace
Example:
.pipe(ext_replace('twig', '.src.twig'))
Upvotes: 2