Skip to content
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

Add support for custom file extensions #62

Merged

Conversation

NullVoxPopuli
Copy link
Contributor

No description provided.

@rwjblue
Copy link
Owner

rwjblue commented Jul 8, 2019

I'm a bit worried about this being a breaking change. Landing this would mean existing codemods would now be running against non-js files (and would almost certainly error when ran).

I wonder if we can have the host codemod-cli project specifically opt-in to the extensions it supports. Either by having them pass that info in when calling bin-support.js (and we could even default to ts,js) or by specifying something in their package.json that we can read, or something smarter than both of those... 🤔

What do you think?

@NullVoxPopuli NullVoxPopuli changed the title Add .hbs to allowed file extensions Add support for custom file extensions Jul 9, 2019
@NullVoxPopuli
Copy link
Contributor Author

Sounds good, check my update ;)

Copy link
Owner

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

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

I just added a test and some README changes to explain how to use custom file types.

Should be good to go once CI is happy...

README.md Show resolved Hide resolved
tests/cli-test.js Outdated Show resolved Hide resolved
@rwjblue
Copy link
Owner

rwjblue commented Jul 9, 2019

I've updated this to instead add an extra argument to the end (instead of being "inside" the paths or globs thing), but I'm going to do a follow up PR to migrate this to use an object (all these ordered arguments are frustrating).

I want to do that separately though so that I can ensure that existing support still works, and new projects get generated with the POJO syntax.

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

Successfully merging this pull request may close these issues.

None yet

2 participants