Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ewanharris/titanium-codemods
Codemod scripts for Titanium Applications
https://github.com/ewanharris/titanium-codemods
Last synced: 1 day ago
JSON representation
Codemod scripts for Titanium Applications
- Host: GitHub
- URL: https://github.com/ewanharris/titanium-codemods
- Owner: ewanharris
- Created: 2019-02-19T12:14:23.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-01-03T16:32:31.000Z (almost 2 years ago)
- Last Synced: 2024-11-02T21:31:44.697Z (6 days ago)
- Language: JavaScript
- Size: 2.03 MB
- Stars: 10
- Watchers: 2
- Forks: 2
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-codemods - titanium-codemods - Codemod scripts for Titanium Applications. (Misc / ant-design)
README
# titanium-codemods
`titanium-codemods` is a collection of codemod scripts for [jscodeshift](https://github.com/facebook/jscodeshift) that intends to make dealing with deprecations and changes in Titanium a little easier.
# Usage
We recommend using `titanium-codemods` via `npx`, this ensures that you're always pulling the newest version.
```sh
npx titanium-codemods --help # display the help
```To run codemods `cd` into your project directory and run `npx titanium-codemods run --dry-run`.
This will prompt to select the transforms to run, once selected the transforms will be ran, and the changes will be logged to the console.
After reviewing the changes you can run `npx titanium-codemods run` to perform the changes on disk
# Included codemods
* [getter-deprecation](transforms/getter-deprecation.js)
* Handle migration for deprecation of getters for properties in SDK 8.
* [setter-deprecation](transforms/setter-deprecation.js)
* Handle migration for deprecation of setters for properties in SDK 8.# Caveats
There's some caveats to running this. As we can't track _what_ an object is, for example in `myLabel.setText('test');` we can't be certain that `myLabel` is actually a `Ti.UI.Label` instance. We recommend validating that the changes are correct rather than relying on the output to be correct.