How can I register a pipe for gulp-replace for several js in gulpfile.js ?
In index.html :
<script src="js/main.js"></script> <script src="js/plagin-1.js"></script> <script src="js/plagin-2.js"></script> In gulpfile.js now:
.pipe(replace('main.js', assets['main.js'])) How to make a replacement for all js files, and not for one main.js?
.pipe(replace('plagin-1.js', assets['plagin-1.js']))and.pipe(replace('plagin-2.js', assets['plagin-2.js']))(if there are many files, then of course you need a more automated way). - Vladimir Gamalyan