UNPKG

723 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3/**
4 * @license
5 * Copyright Google Inc. All Rights Reserved.
6 *
7 * Use of this source code is governed by an MIT-style license that can be
8 * found in the LICENSE file at https://angular.io/license
9 */
10// import { relative, Path } from "../../../angular_devkit/core/src/virtual-fs";
11const core_1 = require("@angular-devkit/core");
12function parseName(path, name) {
13 const nameWithoutPath = core_1.basename(core_1.normalize(name));
14 const namePath = core_1.dirname(core_1.join(core_1.normalize(path), name));
15 return {
16 name: nameWithoutPath,
17 path: core_1.normalize('/' + namePath),
18 };
19}
20exports.parseName = parseName;