source: trip-planner-front/node_modules/@angular-devkit/build-angular/src/utils/output-paths.js@ 6a3a178

Last change on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 905 bytes
Line 
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.ensureOutputPaths = void 0;
11const fs_1 = require("fs");
12const path_1 = require("path");
13function ensureOutputPaths(baseOutputPath, i18n) {
14 const outputPaths = i18n.shouldInline
15 ? [...i18n.inlineLocales].map((l) => [
16 l,
17 i18n.flatOutput ? baseOutputPath : path_1.join(baseOutputPath, l),
18 ])
19 : [['', baseOutputPath]];
20 for (const [, outputPath] of outputPaths) {
21 if (!fs_1.existsSync(outputPath)) {
22 fs_1.mkdirSync(outputPath, { recursive: true });
23 }
24 }
25 return new Map(outputPaths);
26}
27exports.ensureOutputPaths = ensureOutputPaths;
Note: See TracBrowser for help on using the repository browser.