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

[docs] Update the readme blueprint for local usage #78

Merged
merged 3 commits into from
Mar 29, 2020

Conversation

jsturgis
Copy link
Contributor

@jsturgis jsturgis commented Mar 5, 2020

We recently had an engineer who was not familiar with npx and could not figure out
how to run a new codemod locally.

I've updated the blueprint to make it clear to new users how to run a codemod locally before
publishing.

…ng a codemod locally

We recently had an engineer who was not familiar with npx and could not figure out
how to run a new codemod locally.

I've updated the blueprint to make it clear to new users how to run a codemod locally before
publishing.
@@ -37,6 +38,11 @@ module.exports.handler = async function handler(options) {
${projectName} <TRANSFORM NAME> path/of/files/ or/some**/*glob.js
\`\`\`

## Local Usage
\`\`\`
npx ${process.cwd()}/${projectName}${cliPath} <TRANSFORM NAME> path/of/files/ or/some**/*glob.js
Copy link
Owner

Choose a reason for hiding this comment

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

Do we even need npx here? I think this could be:

Suggested change
npx ${process.cwd()}/${projectName}${cliPath} <TRANSFORM NAME> path/of/files/ or/some**/*glob.js
node ./bin/cli.js <TRANSFORM NAME> path/of/files/ or/some**/*glob.js

Copy link
Contributor Author

@jsturgis jsturgis Mar 20, 2020

Choose a reason for hiding this comment

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

You're right we don't need npx here, I was using it for consistency with the other examples but using node is probably better for local invocation.

I've made this change in the latest commit.

…ng a codemod locally

We recently had an engineer who was not familiar with npx and could not figure out
how to run a new codemod locally.

I've updated the blueprint to make it clear to new users how to run a codemod locally before
publishing.
…ng a codemod locally

We recently had an engineer who was not familiar with npx and could not figure out
how to run a new codemod locally.

I've updated the blueprint to make it clear to new users how to run a codemod locally before
publishing.
@rwjblue rwjblue merged commit 455a16b into rwjblue:master Mar 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants