Created
April 9, 2016 23:26
-
-
Save markusklems/a5e6b896c2a2525dd9de4d47eeb0d7d3 to your computer and use it in GitHub Desktop.
Gulp task: replace <script src="node_modules/.../filename.js"> with <script src="lib/filename.js">
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const replace = require('gulp-replace'); | |
gulp.task('copy:index', ['clean'], function() { | |
gulp.src(['index.html']) | |
.pipe(replace(/node_modules(.*)\/(.*).js/g, 'lib/$2.js')) | |
.pipe(gulp.dest('dist')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment