NativeScript / NativeScript/nativescript-cli
Use constants instead of hardcoded `android` and `ios` strings
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.
We have "android", "Android", "ANDROID" and "ios", "iOS", "IOS" hardcoded in many places in the CLI. In most of the places, we are also using platform.toLower() in order to workaround this.
Describe the solution you'd like
We should just use the same constants everywhere (e.g. DevicePlatformsConstants)
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 the NativeScript CLI and search for the hardcoded variants of android, Android, ANDROID, ios, iOS, and IOS, along with existing DevicePlatformsConstants usage. Replace the scattered platform strings with the shared constants and verify that all relevant CLI paths use the same values without needing platform.toLower().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, ios, javascript
- Domain
- cli, mobile-dev
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100