Skip to content

Instantly share code, notes, and snippets.

@apiv
Created September 2, 2015 19:37
Show Gist options
  • Save apiv/f098f410992d8cbd1a23 to your computer and use it in GitHub Desktop.
Save apiv/f098f410992d8cbd1a23 to your computer and use it in GitHub Desktop.
Simple gulp task for migrating to new version of jspm
/**
* Paths ending with / are no longer valid
*/
gulp.task('migrate:jspm', function () {
gulp.src('src/**/*.js')
.pipe(replace(/[a-z\-_0-9]*\/'/gi, function (match) {
return match.substr(0, match.length - 1) + match.substr(0, match.length - 2) + '\'';
}))
.pipe(gulp.dest('src'))
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment