UNPKG

750 BJavaScriptView Raw
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 */
9Object.defineProperty(exports, "__esModule", { value: true });
10exports.findCachePath = void 0;
11const findCacheDirectory = require("find-cache-dir");
12const os_1 = require("os");
13const path_1 = require("path");
14const environment_options_1 = require("./environment-options");
15function findCachePath(name) {
16 if (environment_options_1.cachingBasePath) {
17 return path_1.resolve(environment_options_1.cachingBasePath, name);
18 }
19 return findCacheDirectory({ name }) || os_1.tmpdir();
20}
21exports.findCachePath = findCachePath;