1
0
mirror of https://github.com/angular/angular-cli.git synced 2025-05-16 02:24:10 +08:00
2018-06-05 18:50:06 -07:00

24 lines
656 B
TypeScript

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { WorkspaceProject } from '../utility/config';
/**
* Build a default project path for generating.
* @param project The project to build the path for.
*/
export function buildDefaultPath(project: WorkspaceProject): string {
const root = project.sourceRoot
? `/${project.sourceRoot}/`
: `/${project.root}/src/`;
const projectDirName = project.projectType === 'application' ? 'app' : 'lib';
return `${root}${projectDirName}`;
}