Skip to content

Commit

Permalink
address mistic comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mshustov committed Sep 29, 2020
1 parent 5b89668 commit 7c6a40e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 7 additions & 1 deletion src/dev/typescript/build_refs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,15 @@
*/

import execa from 'execa';
import Path from 'path';
import { run, ToolingLog } from '@kbn/dev-utils';

export async function buildRefs(log: ToolingLog, projectPath: string) {
export async function buildAllRefs(log: ToolingLog) {
await buildRefs(log, 'tsconfig.refs.json');
await buildRefs(log, Path.join('x-pack', 'tsconfig.refs.json'));
}

async function buildRefs(log: ToolingLog, projectPath: string) {
try {
log.debug(`Building TypeScript projects refs for ${projectPath}...`);
await execa(require.resolve('typescript/bin/tsc'), ['-b', projectPath]);
Expand Down
5 changes: 2 additions & 3 deletions src/dev/typescript/run_type_check_cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import getopts from 'getopts';

import { execInProjects } from './exec_in_projects';
import { filterProjectsByFlag } from './projects';
import { buildRefs } from './build_refs';
import { buildAllRefs } from './build_refs';

export async function runTypeCheckCli() {
const extraFlags: string[] = [];
Expand Down Expand Up @@ -80,8 +80,7 @@ export async function runTypeCheckCli() {
process.exit();
}

await buildRefs(log, 'tsconfig.refs.json');
await buildRefs(log, 'x-pack/tsconfig.refs.json');
await buildAllRefs(log);

const tscArgs = [
// composite project cannot be used with --noEmit
Expand Down

0 comments on commit 7c6a40e

Please sign in to comment.