0

I'm trying to update my compile TypeScript task (I've also tried it as a separate task as well) to combine the resulting javascript into one file. Here's my code:

gulp.task('compile:ts', function () {
return gulp
    .src(tscConfig.filesGlob) //filesGlob is "src/ts/**/*.ts"
    .pipe(plumber({
        errorHandler: function (err) {
            console.error('>>> [tsc] Typescript compilation failed'.bold.green);
            this.emit('end');
        }}))
    .pipe(sourcemaps.init())
    .pipe(tsc(tscConfig.compilerOptions))
    .pipe(sourcemaps.write('.'))
    .pipe(concat('all-components.js'))
    .pipe(gulp.dest('public/dist'));
});

I've tried different destination folders, but I never even see the new file created, let alone used. Every example I've found shows that as the correct way and I don't get any errors so I can't tell what's wrong.

Troy Taylor
  • 117
  • 1
  • 2
  • 10

0 Answers0