NativeScript / NativeScript/nativescript-cli
Allow building a Custom Preview App and using it with `tns preview`
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 1.1k
- 派生
- 204
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 8
描述
Is your feature request related to a problem? Please describe.
NativeScript Playground is an amazing developer experience for some really quick tests. Sometimes I test something in the Playgrounds just because it's a great, fast and reliable sandbox. There's not always the intention to share the Playground.
From time to time I want to try something in a Playground that is not possible. That's usually because some native library is missing. I understand the reason for that. Anyways this feature request is all about a solution to this problem. A solution that allows fast, reliable testing over the air. No cables required. A solution however that is not as easy to share.
See: https://www.nativescript.org/blog/join-the-nativescript-5.0-launch-webinar#comment-4151225217
Describe the solution you'd like
Please consider adding a --custom-preview CLI param so we can:
- Add native libraries to our own custom preview app
- Run
tns preview --hmr --custom-preview - Scan the QR code with a Phone and run the app
This would give us a very fast, flexible dev experience. No cables needed.
Maybe something like tns deploy ios --custom-preview could build and deploy a custom preview app with the dependencies of our package.json file.
One thing that is really important to consider when reviewing this request:
A user would be able to build one custom preview app with a whole lot of plugins and reuse that for many different codebases to quickly fiddle around. The idea is not to run tns deploy ios --custom-preview on a daily basis. This is for situations where you might want to fiddle around with a NativeScript next version or something along those lines.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 tns preview --hmr 流程开始,并将其与 tns deploy ios 进行比较,重点关注 package.json 依赖项、自定义原生库、二维码传递以及 preview 应用复用应如何结合。完成的标准是:用户可以构建包含其原生依赖项的自定义 preview 应用,在多个项目之间复用该应用,并在无需线缆的情况下通过无线方式启动它。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- cli, mobile
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100