Last change
on this file since 59329aa was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
3.1 KB
|
Line | |
---|
1 | (function (factory) {
|
---|
2 | if (typeof module === "object" && typeof module.exports === "object") {
|
---|
3 | var v = factory(require, exports);
|
---|
4 | if (v !== undefined) module.exports = v;
|
---|
5 | }
|
---|
6 | else if (typeof define === "function" && define.amd) {
|
---|
7 | define("@angular/compiler-cli/ngcc/src/path_mappings", ["require", "exports"], factory);
|
---|
8 | }
|
---|
9 | })(function (require, exports) {
|
---|
10 | "use strict";
|
---|
11 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
12 | exports.getPathMappingsFromTsConfig = void 0;
|
---|
13 | /**
|
---|
14 | * If `pathMappings` is not provided directly, then try getting it from `tsConfig`, if available.
|
---|
15 | */
|
---|
16 | function getPathMappingsFromTsConfig(fs, tsConfig, projectPath) {
|
---|
17 | if (tsConfig !== null && tsConfig.options.baseUrl !== undefined &&
|
---|
18 | tsConfig.options.paths !== undefined) {
|
---|
19 | return {
|
---|
20 | baseUrl: fs.resolve(projectPath, tsConfig.options.baseUrl),
|
---|
21 | paths: tsConfig.options.paths,
|
---|
22 | };
|
---|
23 | }
|
---|
24 | }
|
---|
25 | exports.getPathMappingsFromTsConfig = getPathMappingsFromTsConfig;
|
---|
26 | });
|
---|
27 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGF0aF9tYXBwaW5ncy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvbXBpbGVyLWNsaS9uZ2NjL3NyYy9wYXRoX21hcHBpbmdzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7OztJQWVBOztPQUVHO0lBQ0gsU0FBZ0IsMkJBQTJCLENBQ3ZDLEVBQW9CLEVBQUUsUUFBa0Ms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