Below gulp rename task works good for angularjs2 ts files with one dot, such as appcomponent.ts. However, if the file name has two dots like login.service.ts, gulp extname is confused and will take whatever after the first dot as the extension. Any idea how to let extname know the extension is after the last dot?
gulp.task('ts', function () {
return gulp.src('src/**/*.ts')
.pipe(rename({
extname: ''
}))
.pipe(traceur({
modules: 'instantiate',
moduleName: true,
annotations: true,
types: true,
memberVariables: true
}))
.pipe(rename({
extname: '.js'
}))
.pipe(gulp.dest('build'));
});