Skip to content

Commit fa7341a

Browse files
trevor-scheerJakeDawkins
authored andcommitted
Add documentation and launch task for CLI active development (#898)
* Add documentation and launch tast for CLI active development * Fix circle config for docs branches
1 parent 83fa591 commit fa7341a

3 files changed

Lines changed: 23 additions & 16 deletions

File tree

.circleci/config.yml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -111,23 +111,12 @@ jobs:
111111
- ~/.npm
112112
- run: ENGINE_API_KEY=$CHECKS_API_KEY ./packages/apollo/bin/run client:check
113113

114-
ignore_doc_branches: &ignore_doc_branches
115-
filters:
116-
branches:
117-
# If 'docs' is found, with word boundaries on either side, skip.
118-
ignore: /.*?\bdocs\b.*/
119-
120114
workflows:
121115
version: 2
122116
Build and Test:
123117
jobs:
124-
- Node.js 8:
125-
<<: *ignore_doc_branches
126-
- Node.js 10:
127-
<<: *ignore_doc_branches
128-
- VSCode:
129-
<<: *ignore_doc_branches
130-
- Linting:
131-
<<: *ignore_doc_branches
132-
- Query Check:
133-
<<: *ignore_doc_branches
118+
- Node.js 8
119+
- Node.js 10
120+
- VSCode
121+
- Linting
122+
- Query Check

.vscode/launch.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@
4343
"protocol": "inspector",
4444
"port": 9001,
4545
"sourceMaps": true
46+
},
47+
{
48+
"name": "Attach to CLI Debugger",
49+
"type": "node",
50+
"request": "attach",
51+
"protocol": "inspector",
52+
"port": 9002,
53+
"sourceMaps": true
4654
}
4755
]
4856
}

packages/apollo/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,16 @@ It can also be helpful to print standard out during testing. To enable logging,
607607
.stdout({ print: true })
608608
```
609609
610+
## Active Development / Debugging
611+
612+
To simplify the development process, you may want to step through and debug commands whose behavior you're modifying. To do this, run the executable with node in debug mode like so, where `<command>` is a valid CLI command like `client:check` or `service:push`:
613+
614+
```
615+
node --inspect-brk=9002 packages/apollo/bin/run <command>
616+
```
617+
618+
If you're using VS Code, you can run the included "Attach to CLI Debugger" launch task and debug right from VS Code! Otherwise, you may use the (Chrome inspector)[https://nodejs.org/en/docs/guides/debugging-getting-started/] or other Node debugger of your choice.
619+
610620
## Publishing
611621
612622
- Make sure you have a `GITHUB_AUTH` set in your environment variables. For more information on setting `GITHUB_AUTH`, check the [`lerna-changelog` documentation](https://github.com/lerna/lerna-changelog#github-token).

0 commit comments

Comments
 (0)