angular / angular/angular-cli

ng add - please specify a project name

オープン
#11,016 コメント 3 件 リアクション 17 件 担当者 0 名 GitHub で見る
area: @angular/cli feature feature: insufficient votes
主要言語
TypeScript
スター
27k
フォーク
11.8k
平均マージ
14時間 23分
マージ済み PR(30日)
162

説明

### Versions
```sh

_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/

Angular CLI: 6.0.5
Node: 10.1.0
OS: darwin x64
Angular: 6.0.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package Version
------------------------------------------------------------
@angular-devkit/architect 0.6.5
@angular-devkit/build-angular 0.6.5
@angular-devkit/build-ng-packagr 0.6.5
@angular-devkit/build-optimizer 0.6.5
@angular-devkit/core 0.6.5
@angular-devkit/schematics 0.6.5
@angular/cli 6.0.5
@angular/material 6.1.0
@ngtools/json-schema 1.1.0
@ngtools/webpack 6.0.5
@schematics/angular 0.6.5
@schematics/update 0.6.5
ng-packagr 3.0.0-rc.5
rxjs 6.2.0
typescript 2.7.2
webpack 4.8.3
```

### Repro steps

* Step 1
starting a new project with `ng new angular-project`
* Step 2
generate a library/application inside the new angular-cli project
```sh
ng g library mylibrary
ng g application myapp
```
* Step 3
Add @angular/material
```
ng add @angular/material myapp
Installing packages for tooling via npm.
Multiple projects are defined; please specify a project name
```

### Observed behavior

`@angular/material` gets correclty installed in the node dependencies but the `myapp` project is not configured for using the library.

### Desired behavior

The current `ng add` usage is: `usage: ng add `
Ideally this should allow passing the target app like this:

```sh
usage: ng add [options]
options:
--project
The name of the project.
```

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、`mylibrary` と `myapp` の両方を含むワークスペースで `ng add @angular/material myapp` のフローを再現し、その後 `ng add` コマンドのエントリーポイントを追跡します。コマンドがプロジェクト名を受け取り、パッケージをインストールするだけでなく `myapp` を Angular Material 用に設定できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
cli, frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。