Skip to content

Commit ccece18

Browse files
committed
docs: add development workflow to readme
This also adds a .cmd file so that the development experience is the same for Windows users. Currently we need to make sure to run the bin with node whereas it's not necessary on Unix.
1 parent 85835e6 commit ccece18

File tree

4 files changed

+37
-1
lines changed

4 files changed

+37
-1
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,39 @@ Example:
195195
["aar", { "reverseJetify": true }]
196196
```
197197

198+
## Development workflow
199+
200+
To get started with the project, run `yarn` in the root directory to install the required dependencies.
201+
202+
```sh
203+
yarn
204+
```
205+
206+
While developing, you can run watch mode to automatically rebuild the changes:
207+
208+
```sh
209+
yarn watch
210+
```
211+
212+
To test the CLI locally, you can point to the `bin/bob` executable:
213+
214+
```sh
215+
../bob/bin/bob create test-project
216+
```
217+
218+
Before sending a pull rquest, make sure your code passes TypeScript and ESLint. Run the following to verify:
219+
220+
```sh
221+
yarn typescript
222+
yarn lint
223+
```
224+
225+
To fix formatting errors, run the following:
226+
227+
```sh
228+
yarn lint --fix
229+
```
230+
198231
## Acknowledgements
199232

200233
Thanks to the authors of these libraries for inspiration:
File renamed without changes.

bin/bob.cmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@echo off
2+
3+
node "%~dp0\bob" %*

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"license": "MIT",
99
"main": "src/index.js",
1010
"bin": {
11-
"bob": "bin/bob.js"
11+
"bob": "bin/bob"
1212
},
1313
"files": [
1414
"bin",

0 commit comments

Comments
 (0)