Skip to content

Commit

Permalink
Merge pull request #13567 from iamandrewluca/patch-3
Browse files Browse the repository at this point in the history
Build: remove redundant checks for TS type declaration generation
  • Loading branch information
gaetanmaisse authored Jan 7, 2021
2 parents 7a32e38 + 74bb266 commit 9b37d68
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions scripts/utils/compile-tsc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function getCommand(watch) {
const tsc = path.join(__dirname, '..', '..', 'node_modules', '.bin', 'tsc');
const downlevelDts = path.join(__dirname, '..', '..', 'node_modules', '.bin', 'downlevel-dts');

const args = ['--outDir ./dist/ts3.9', '--listEmittedFiles true'];
const args = ['--outDir ./dist/ts3.9', '--listEmittedFiles true', '--declaration true'];

/**
* Only emit declarations if it does not need to be compiled with tsc
Expand All @@ -17,15 +17,7 @@ function getCommand(watch) {
const isAngular = process.cwd().includes(path.join('app', 'angular'));
const isStoryshots = process.cwd().includes(path.join('addons', 'storyshots'));
if (!isAngular && !isStoryshots) {
args.push('--emitDeclarationOnly --declaration true');
}

if (isAngular) {
args.push('--declaration true');
}

if (isStoryshots) {
args.push('--declaration true');
args.push('--emitDeclarationOnly');
}

if (watch) {
Expand Down

0 comments on commit 9b37d68

Please sign in to comment.