1

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

Exil
  • 311
  • 2
  • 11
  • 26
jjscloud
  • 41
  • 8

1 Answers1

2

Use gulp-ext-replace

Example:

.pipe(ext_replace('twig', '.src.twig'))
Exil
  • 311
  • 2
  • 11
  • 26
jjscloud
  • 41
  • 8