Skip to content

Commit 455a16b

Browse files
author
Robert Jackson
authored
Merge pull request #78 from jsturgis/master
[docs] Update the readme blueprint for local usage
2 parents b6271b7 + 508e591 commit 455a16b

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

commands/global/new.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff 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';

commands/local/generate/codemod.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff 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-->

0 commit comments

Comments
 (0)