NativeScript / NativeScript/nativescript-cli

Plugin update won't work with locally developed plugin

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

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

plugins to-be-checked
Ngôn ngữ chính
JavaScript
Star
1.1k
Fork
204
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
8

Mô tả

Hello,

Description

I created a tns app with tns create MyTnsApp --tsc and a plugin (with nativescript-plugin-seed) for it and put it to the plugins folder.

Here is the directory tree:

├── app
│   ├── package.json
│   └── <other files>
├── hooks
│   └── < ... >
├── node_modules
│   └── < ... >
├── package.json
├── platforms
│   └── < ... >
└── plugins
    └── nativescript-myplugin
        └── src
            ├── package.json
            └── < ... >

I can successfully add the plugin via: tns plugin add plugins/nativescript-myplugin/src/

I can successfully remove the plugin via: tns plugin remove nativescript-myplugin

The problem

Using tns plugin update nativescript-myplugin removes the plugin I want but it tries to get the source from https://registry.npmjs.org/nativescript-myplugin which drops a 404 error, of course.
So, the install fails.

Using tns plugin update plugins/nativescript-myplugin/src/ says "Plugin "plugins/nativescript-myplugin/src/" is not installed."

The expectation

I would like to update my plugin even if I develop it locally.
Either giving the path of the plugin or the name of it,update should work without a problem.

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.

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện hành vi với tns plugin add plugins/nativescript-myplugin/src/, sau đó chạy cả tns plugin update nativescript-myplugin và lệnh cập nhật dựa trên đường dẫn. Theo dõi điểm vào CLI của tns plugin update và so sánh cách các plugin cục bộ đã cài đặt được ghi nhận và phân giải. Công việc được xem là hoàn tất khi có thể cập nhật plugin cục bộ theo tên hoặc đường dẫn mà không tìm nạp một gói npm không khả dụng.

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

Đánh giá

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

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.