Skip to content

Feat/allow specifying multiple transforms #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 3, 2022

Conversation

danieldelcore
Copy link
Contributor

Continuation of: #66

kiprasmel and others added 2 commits January 3, 2022 12:27
maybe would be nicer if the interface would be `-t t1 -t t2 -t t3`
instead of current `-t t1,t2,t3` (you could separate into multiple lines
and keep it cleaner), but don't know how to do that so this works just fine.

Signed-off-by: Kipras Melnikovas <kipras@kipras.org>
@danieldelcore danieldelcore merged commit 8ab5311 into main Jan 3, 2022
@danieldelcore danieldelcore deleted the feat/allow-specifying-multiple-transforms branch January 3, 2022 01:43
Copy link
Contributor

@kiprasmel kiprasmel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, thanks! just one thing:


**example:**

- `$ codeshift-cli --transform codemods/my-special-mod /project/src/file.js`
- `$ codeshift-cli --transform codemods/my-special-mod/index.ts /project/src/file.js`
- `$ codeshift-cli --transform path/to/transform1.ts, path/to/transform2.ts, path/to/transform3.ts /project/src/file.js`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you cannot leave spaces between the commas since separate arguments will be parsed, and ofc we rely on it being a single argument and we're splitting it by , - thus you'll need to change it to:

Suggested change
- `$ codeshift-cli --transform path/to/transform1.ts, path/to/transform2.ts, path/to/transform3.ts /project/src/file.js`
- `$ codeshift-cli --transform path/to/transform1.ts,path/to/transform2.ts,path/to/transform3.ts /project/src/file.js`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants