From da0fe47aa43d6a2e802fcc66fe4ee9d60ade4b0f Mon Sep 17 00:00:00 2001 From: heymdall Date: Fri, 15 Jun 2018 13:34:19 +0300 Subject: [PATCH] fix(typings): do not override existing d.ts --- gulp-tasks.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gulp-tasks.js b/gulp-tasks.js index 48f9039..8e237d6 100644 --- a/gulp-tasks.js +++ b/gulp-tasks.js @@ -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));