mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-22 23:15:56 +08:00
11 lines
349 B
TypeScript
11 lines
349 B
TypeScript
import * as path from 'path';
|
|
import * as ts from 'typescript';
|
|
|
|
export function readTsconfig(tsconfigPath: string) {
|
|
const configResult = ts.readConfigFile(tsconfigPath, ts.sys.readFile);
|
|
const tsConfig = ts.parseJsonConfigFileContent(configResult.config, ts.sys,
|
|
path.dirname(tsconfigPath), undefined, tsconfigPath);
|
|
return tsConfig;
|
|
}
|
|
|