File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ module.exports.handler = async function handler(options) {
1616 const { stripIndent } = require ( 'common-tags' ) ;
1717 const latestVersion = require ( 'latest-version' ) ;
1818 const pkg = require ( '../../package.json' ) ;
19+ const cliPath = '/bin/cli.js' ;
1920
2021 fs . outputFileSync (
2122 projectName + '/README.md' ,
@@ -37,6 +38,11 @@ module.exports.handler = async function handler(options) {
3738 ${ projectName } <TRANSFORM NAME> path/of/files/ or/some**/*glob.js
3839 \`\`\`
3940
41+ ## Local Usage
42+ \`\`\`
43+ node .${ cliPath } <TRANSFORM NAME> path/of/files/ or/some**/*glob.js
44+ \`\`\`
45+
4046 ## Transforms
4147
4248 <!--TRANSFORMS_START-->
@@ -72,7 +78,7 @@ module.exports.handler = async function handler(options) {
7278 'update-docs' : 'codemod-cli update-docs' ,
7379 coveralls : 'cat ./coverage/lcov.info | node node_modules/.bin/coveralls' ,
7480 } ,
75- bin : './bin/cli.js' ,
81+ bin : `. ${ cliPath } ` ,
7682 keywords : [ 'codemod-cli' ] ,
7783 dependencies : {
7884 'codemod-cli' : `^${ pkg . version } ` ,
@@ -239,7 +245,7 @@ module.exports.handler = async function handler(options) {
239245 `
240246 ) ;
241247 fs . outputFileSync (
242- projectName + '/bin/cli.js' ,
248+ ` ${ projectName } ${ cliPath } ` ,
243249 stripIndent `
244250 #!/usr/bin/env node
245251 'use strict';
Original file line number Diff line number Diff line change @@ -70,6 +70,11 @@ module.exports.handler = function handler(options) {
7070 ${ projectName } ${ codemodName } path/of/files/ or/some**/*glob.js
7171 \`\`\`
7272
73+ ## Local Usage
74+ \`\`\`
75+ node ./bin/cli.js ${ codemodName } path/of/files/ or/some**/*glob.js
76+ \`\`\`
77+
7378 ## Input / Output
7479
7580 <!--FIXTURES_TOC_START-->
You can’t perform that action at this time.
0 commit comments