ng add - please specify a project name

Đang mở
#11,016 3 bình luận 17 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
angular, typescript
Lĩnh vực
cli, frontend

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện luồng ng add @angular/material myapp trong một workspace chứa cả mylibrarymyapp, sau đó lần theo entry point của lệnh ng add. Hoàn thành khi lệnh chấp nhận tên project và cấu hình myapp cho Angular Material thay vì chỉ cài đặt package.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area: @angular/cli feature feature: insufficient votes
Versions

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


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
    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 <collection>
Ideally this should allow passing the target app like this:

usage: ng add <collection> [options]
options:
  --project
      The name of the project.
Ngôn ngữ chính
TypeScript
Star
27k
Fork
11.8k
Merge trung bình
16 giờ 35 phút
Pull request đã merge (30 ngày)
176

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của angular/angular-cli

Tất cả issue của angular/angular-cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.