Skip to content

Commit

Permalink
fix(typings): do not override existing d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Heymdall committed Jun 15, 2018
1 parent 6136e90 commit da0fe47
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gulp-tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ function createTasks(packageName, options = {}) {
}))
.pipe(filter(file => !fs.existsSync(
// ignore all files, that already emit d.ts file
path.join(options.publishDir, file.relative).replace(/\.ts$/, '.d.ts')
path.join(process.cwd(), options.publishDir, file.relative)
.replace(/\.tsx?$/, '.d.ts')
)))
.pipe(ts(tsOptions, ts.reporter.nullReporter())) // ignore all errors at compile time
.dts.pipe(gulp.dest(options.publishDir));
Expand Down

0 comments on commit da0fe47

Please sign in to comment.