Skip to content

Commit

Permalink
fixup! feat(scripts-tasks): implement type-check alias, update genera…
Browse files Browse the repository at this point in the history
…te-api, refactor getTsPathAliasesConfig
  • Loading branch information
Hotell committed Apr 19, 2023
1 parent 20cb315 commit 4103b4b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/tasks/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { execSync } from 'child_process';
import * as fs from 'fs';
import * as path from 'path';

import { stripJsonComments } from '@nrwl/devkit';
import { parseJson, stripJsonComments } from '@nrwl/devkit';
import type { TscTaskOptions } from 'just-scripts';

/**
Expand Down Expand Up @@ -40,8 +40,10 @@ export function getTsPathAliasesConfig() {
lib: fs.existsSync(tsConfigFilePaths.lib) ? fs.readFileSync(tsConfigFilePaths.lib, 'utf-8') : null,
};
const tsConfigs = {
root: tsConfigFileContents.root ? (JSON.parse(tsConfigFileContents.root) as TsConfig) : null,
lib: tsConfigFileContents.lib ? (JSON.parse(tsConfigFileContents.lib) as TsConfig) : null,
root: tsConfigFileContents.root
? (parseJson(tsConfigFileContents.root, { expectComments: true }) as TsConfig)
: null,
lib: tsConfigFileContents.lib ? (parseJson(tsConfigFileContents.lib, { expectComments: true }) as TsConfig) : null,
};
const packageJson: PackageJson = JSON.parse(fs.readFileSync(path.join(cwd, './package.json'), 'utf-8'));

Expand Down

0 comments on commit 4103b4b

Please sign in to comment.