0

I'm actually confused. I have a gulp task for compiling ts-files.

gulp.task('build:js', function (){
var tsProject = ts.createProject('./tsconfig.json');

return gulp.src('./src/**/*.ts')
    .pipe(sourcemaps.init())
        .pipe(ts(tsProject))
    .pipe(sourcemaps.write('.'))
    .pipe(gulp.dest('./dist/'));
});

This should compile my ts-files and put them into the dist-folder afterwards without keeping the original folderstructure, in this case src/. It worked just fine last week and today I just wanted to run my programm and, suddenly, it is copying the base-path.

So actually, after compilation I get a dist/src folder instead of just the dist/ folder with the compilated files in it.

I don't get it. I didn't touch that build-task for atleast one week and it worked just fine. Any ideas? Or, is there a way to set the path to only dist/ as a workaround?

Faigjaz
  • 818
  • 3
  • 15
  • 30
  • Did you ever find a solution to this? – Richard Jul 27 '16 at 14:59
  • 1
    Sorry for the very late response. I actually worked around it, as it gives more oversight and with my app becoming bigger and bigger this was the way to go to anyway. So, no. I'm sorry. :( – Faigjaz Aug 17 '16 at 06:28
  • Possible duplicate of [Can you remove a folder structure when copying files in gulp?](http://stackoverflow.com/questions/24658011/can-you-remove-a-folder-structure-when-copying-files-in-gulp) – bPratik Jan 06 '17 at 14:22

0 Answers0