parse-tsconfig.js 836 B

12345678910111213141516171819202122
  1. "use strict";
  2. /**
  3. * @license
  4. * Copyright Google LLC All Rights Reserved.
  5. *
  6. * Use of this source code is governed by an MIT-style license that can be
  7. * found in the LICENSE file at https://angular.io/license
  8. */
  9. Object.defineProperty(exports, "__esModule", { value: true });
  10. const ts = require("typescript");
  11. function parseTsconfigFile(tsconfigPath, basePath) {
  12. const { config } = ts.readConfigFile(tsconfigPath, ts.sys.readFile);
  13. const parseConfigHost = {
  14. useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames,
  15. fileExists: ts.sys.fileExists,
  16. readDirectory: ts.sys.readDirectory,
  17. readFile: ts.sys.readFile,
  18. };
  19. return ts.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
  20. }
  21. exports.parseTsconfigFile = parseTsconfigFile;
  22. //# sourceMappingURL=parse-tsconfig.js.map