@@ -19,17 +19,21 @@ The cli allows you to run transforms either from the [community folder](https://
1919
2020## Usage/Installation
2121
22- We recommend running the CLI with ` npx ` to ensure you always have the latest version.
22+ We recommend running the CLI with ` $ npx` to ensure you always have the latest version.
2323
2424` $ npx @codeshift/cli --packages mylib@1.0.0 /project/src `
2525
2626But it can also be installed normally:
2727
28- ` npm install -g @codeshift/cli ` or ` yarn global add @codeshift/cli `
28+ ` $ npm install --save-dev @codeshift/cli` or ` yarn add -D @codeshift/cli `
2929
3030Or globally:
3131
32- ` npm install --save-dev @codeshift/cli ` or ` yarn add -D @codeshift/cli `
32+ ` $ npm install -g @codeshift/cli ` or ` yarn global add @codeshift/cli `
33+
34+ and run with:
35+
36+ ` $ codeshift-cli `
3337
3438## Options
3539
@@ -39,17 +43,17 @@ The transform to run, transforms can be either a single file or directory with a
3943
4044** example:**
4145
42- - ` npx @ codeshift/ cli --transform codemods/my-special-mod /project/src/file.js`
43- - ` npx @ codeshift/ cli --transform codemods/my-special-mod/index.ts /project/src/file.js`
46+ - ` $ codeshift- cli --transform codemods/my-special-mod /project/src/file.js`
47+ - ` $ codeshift- cli --transform codemods/my-special-mod/index.ts /project/src/file.js`
4448
4549### --packages
4650
4751Runs transforms for the specified comma separated list of packages, optionally include a version for each package to run all transforms since that version
4852
4953** example:**
5054
51- - ` npx @ codeshift/ cli --packages @atlaskit/button /project/src`
52- - ` npx @ codeshift/ cli --packages @atlaskit/button@3.0.0,@atlaskit/range@4.0.0 /project/src`
55+ - ` $ codeshift- cli --packages @atlaskit/button /project/src`
56+ - ` $ codeshift- cli --packages @atlaskit/button@3.0.0,@atlaskit/range@4.0.0 /project/src`
5357
5458### --parser, -p
5559
@@ -65,42 +69,42 @@ Parser to use for parsing the source files you are code modding.
6569
6670** example:**
6771
68- - ` npx @ codeshift/ cli --parser tsx /project/src/file.ts`
69- - ` npx @ codeshift/ cli -p babel /project/src/file.js`
72+ - ` $ codeshift- cli --parser tsx /project/src/file.ts`
73+ - ` $ codeshift- cli -p babel /project/src/file.js`
7074
7175### --extensions, -e
7276
7377Transform files with these file extensions (comma separated list) (default: js)
7478
7579** example:**
7680
77- - ` npx @ codeshift/ cli --extensions ts,tsx /project/src/file.js`
78- - ` npx @ codeshift/ cli -e js /project/src/file.js`
81+ - ` $ codeshift- cli --extensions ts,tsx /project/src/file.js`
82+ - ` $ codeshift- cli -e js /project/src/file.js`
7983
8084### --ignore-pattern
8185
8286Ignore files that match a provided glob expression
8387
8488** example:**
8589
86- - ` @ codeshift/ cli --ignore-pattern node_modules /project/src/file.js`
90+ - ` $ codeshift- cli --ignore-pattern node_modules /project/src/file.js`
8791
8892### --version, -v
8993
9094Get current version number
9195
9296** example:**
9397
94- - ` @ codeshift/ cli --version`
95- - ` @ codeshift/ cli -v`
98+ - ` $ codeshift- cli --version`
99+ - ` $ codeshift- cli -v`
96100
97101### --help
98102
99103Print all help text to the command line
100104
101105** example:**
102106
103- - ` @ codeshift/ cli --help`
107+ - ` $ codeshift- cli --help`
104108
105109## Commands
106110
@@ -112,11 +116,11 @@ Lists available codemods for the provided packages
112116
113117Print a list of available codemods for a single package
114118
115- - ` @ codeshift/ cli list mylib`
119+ - ` $ codeshift- cli list mylib`
116120
117121Print a list of available codemods for multiple packages
118122
119- - ` @ codeshift/ cli list mylib, @material-ui/button`
123+ - ` $ codeshift- cli list mylib, @material-ui/button`
120124
121125### init
122126
@@ -127,7 +131,7 @@ Generates a new codemod at your desired path
127131Create a new codemod package called foobar with a transform for version 10
128132on the Desktop
129133
130- - ` @ codeshift/ cli init --packageName="foobar" --version"10.0.0" ~/Desktop`
134+ - ` $ codeshift- cli init --packageName="foobar" --version"10.0.0" ~/Desktop`
131135
132136### validate
133137
@@ -137,8 +141,8 @@ Validates a codemod package at the desired path.
137141
138142Validate a codemod package called "my-codemods".
139143
140- - ` $ npx @ codeshift/ cli validate ./codemods/my-codemods `
144+ - ` $ codeshift- cli validate ./codemods/my-codemods `
141145
142146Validate a codemod package from the current working directory
143147
144- - ` $ npx @ codeshift/ cli validate `
148+ - ` $ codeshift- cli validate `
0 commit comments