NativeScript / NativeScript/nativescript-cli
`tns preview` does not handle custom binary files
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 204
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 8
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lib/services/livesync/playground/preview-app-files-service.ts around the file-type check at line 65, then trace how tns preview command parameters are defined. Add a way to specify extra extensions that must be treated as binary and verify that those files are synced as base64-encoded content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100