Support relative pathing for `ng generate` statements
- 主要语言
- TypeScript
- 星标
- 27k
- 派生
- 11.8k
- 平均合并
- 14 小时 23 分钟
- 30 天内合并 PR
- 162
描述
### Bug Report or Feature Request (mark with an `x`)
```
- [ ] bug report -> please search issues before submitting
- [x] feature request
```
### Versions.
```@angular/cli: 1.0.4
node: 6.10.2
os: linux x64
@angular/common: 4.1.3
@angular/compiler: 4.1.3
@angular/core: 4.1.3
@angular/forms: 4.1.3
@angular/http: 4.1.3
@angular/platform-browser: 4.1.3
@angular/platform-browser-dynamic: 4.1.3
@angular/router: 4.1.3
@angular/cli: 1.0.4
@angular/compiler-cli: 4.1.3
```
### Repro steps.
From project root:
```
ng g component ./src/app/components/test
```
### The log given by the failure.
```
installing component
create src/app/src/app/components/test/test.component.scss
create src/app/src/app/components/test/test.component.html
create src/app/src/app/components/test/test.component.spec.ts
create src/app/src/app/components/test/test.component.ts
```
### Desired functionality.
Doesn't create src/app under the (already existing) src/app directory.
This is a minor change, but would then allow me to use autocomplete with the generator, even if the immediate fix is to just remove 'src/app' from the file location input before processing.
### Mention any other details that might be useful.
贡献指南
调研方向
从项目根目录运行 `ng g component ./src/app/components/test` 重现该问题,并检查 Angular CLI 生成器如何解析该相对路径。完成的标准是生成的文件位于现有的 `src/app` 目录下,且不会创建重复的 `src/app/src/app` 路径。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- cli, tooling
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100