I have several typescript files that I want to compile into a single javascript file. So far I have the following code:
var typescript = require('gulp-typescript');
gulp.task('typescript', function () {
gulp.src('wwwroot/app/**/*.ts')
.pipe(typescript({
out: 'script.js'
}))
.pipe(sourcemaps.init())
.pipe(sourcemaps.write())
.pipe(gulp.dest('wwwroot/app'))
});
I searched the Internet for how to do this, but could not find anything useful. I read that the "exit" option combines and outputs the output into a single file. Can someone point me in the right direction? So far, the code that I have will only create one javascript for each typescript file that I have.
user2678324
source
share