NativeScript / NativeScript/nativescript-cli
`tns preview` does not handle custom binary files
還沒有人認領這個 Issue。
- 主要語言
- JavaScript
- 星號
- 1.1k
- 分支
- 204
- 平均合併
- 1 天 9 小時
- 30 天內合併 PR
- 8
描述
Is your feature request related to a problem? Please describe.
The tns preview command syncs files based on their file extension. If the file is binary it should be sent as base64 encoded file. Currently the check is based on a third party dependency istextorbinary
https://github.com/NativeScript/nativescript-cli/blob/8722364da49c9950e65d79014e66d3a17a59d0ce/lib/services/livesync/playground/preview-app-files-service.ts#L65
This lib only supports a limited set of binary extensions
https://github.com/bevry/binaryextensions/blob/master/source/index.json
Describe the solution you'd like
Add a parameter to the command to allow adding additional extensions that must be handled as binary.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 lib/services/livesync/playground/preview-app-files-service.ts 第 65 行附近的檔案類型檢查開始,然後追蹤 tns preview 命令參數的定義方式。新增一種指定必須視為二進位檔案處理的額外副檔名的方法,並確認這些檔案會以 base64 編碼的內容進行同步。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript
- 領域
- cli
- Issue 類型
- 功能
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100