-
Notifications
You must be signed in to change notification settings - Fork 25
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
Updates to support custom extensions in codemod-cli #4
Updates to support custom extensions in codemod-cli #4
Conversation
rwjblue/codemod-cli#62 is merged and released, should be ready to update... |
bin/cli.js
Outdated
@@ -1,9 +1,15 @@ | |||
#!/usr/bin/env node | |||
'use strict'; | |||
|
|||
|
|||
const extensionArgs = ['--extensions', 'hbs']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const extensionArgs = ['--extensions', 'hbs']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this broke things :-\
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think because previously, the file path was the last thing, and now the extension is. The path needs to be last :-\
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or, I'm pulled to thin, and don't know how this works:
await execa('../../../bin/cli.js', ['http://localhost:4200', 'app'], execOpts);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anyway, to make this PR worth merging, the integration tests should pass *
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path needs to be last :-\
Ya, not sure why you think that. runTransform
is defined like:
function runTransform(binRoot, transformName, args, extensions = DEFAULT_EXTENSIONS) {
So the paths aren't last, they are the third argument, and the extensions (comma separated string) is last.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll poke at the branch though, maybe I made a mistake in the impl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya, not sure why you think that. runTransform is defined like:
legit! I did not check that out. I think my assumption was a red herring.
…operly run the integration tests (and, in general, invoke the codemod) Should be good for external testing to begin once this is merged. update the cli.js update deps Update bin/cli.js Co-Authored-By: Robert Jackson <[email protected]> idk they run! yay! try to get input and output the same fix linting
7dcaa8c
to
a28968c
Compare
@rwjblue integrate tests pass now :) |
Pending: rwjblue/codemod-cli#62