Skip to content

Commit

Permalink
docs: remove egg-ts-helper && inspect-brk (#3603)
Browse files Browse the repository at this point in the history
  • Loading branch information
atian25 authored and whxaxes committed Apr 10, 2019
1 parent e0a1d8f commit 2357fbc
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 50 deletions.
4 changes: 3 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@ Contributors guide: https://github.com/eggjs/egg/blob/master/CONTRIBUTING.md
##### Description of change
<!-- Provide a description of the change below this comment. -->

<!--
- any feature?
- close https://github.com/eggjs/egg/ISSUE_URL
- close https://github.com/eggjs/egg/ISSUE_URL
-->
6 changes: 3 additions & 3 deletions docs/source/en/core/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $ npm i egg-bin --save-dev

## Start App

Once we have modified code and saved in local development, the app will restart automatically, and our changes will take place right after that.
Once we have modified code and saved in local development, the app will restart automatically, and our changes will take place right after that.

### Adding Script

Expand Down Expand Up @@ -248,7 +248,7 @@ $ egg-bin debug --inpsect=9229

App starts by `env: local` when executing debug . The configuration comes from the combination of both `config.local.js` and `config.unittest.js`.

#### Debug with [DevTools]
#### Debug with [DevTools]

The latest DevTools only supports [Inspector Protocol]. Thus you will need to install Node.js 8.x or higher verions to be able to use it.

Expand Down Expand Up @@ -307,7 +307,7 @@ There are 2 ways:
"cwd": "${workspaceRoot}",
"runtimeExecutable": "npm",
"windows": { "runtimeExecutable": "npm.cmd" },
"runtimeArgs": [ "run", "debug", "--", "--inspect-brk" ],
"runtimeArgs": [ "run", "debug" ],
"console": "integratedTerminal",
"protocol": "auto",
"restart": true,
Expand Down
32 changes: 10 additions & 22 deletions docs/source/en/tutorials/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,26 +405,8 @@ What we do is just to do some configs in `package.json`:

```json
{
"devDependencies": {
"egg-ts-helper": "^1"
},
"scripts": {
"dev": "egg-bin dev -r egg-ts-helper/register",
"test-local": "egg-bin test -r egg-ts-helper/register",
"clean": "ets clean"
}
}
```

In the latest version of `egg-bin`, we can also support simplify configs of scripts through `egg.require`:

```json
{
"devDependencies": {
"egg-ts-helper": "^1"
},
"egg": {
"require": [ "egg-ts-helper/register" ]
"declarations": true
},
"scripts": {
"dev": "egg-bin dev",
Expand Down Expand Up @@ -467,10 +449,13 @@ Run commands as what you do before, and we've built `Error stacks and coverages`
```json
{
"name": "showcase",
"egg": {
"declarations": true
},
"scripts": {
"test": "npm run lint -- --fix && npm run test-local",
"test-local": "egg-bin test -r egg-ts-helper/register",
"cov": "egg-bin cov -r egg-ts-helper/register",
"test-local": "egg-bin test",
"cov": "egg-bin cov",
"lint": "tslint ."
}
}
Expand All @@ -483,8 +468,11 @@ There's no main difference for debugging in TS, it can reach correct positions t
```json
{
"name": "showcase",
"egg": {
"declarations": true
},
"scripts": {
"debug": "egg-bin debug -r egg-ts-helper/register",
"debug": "egg-bin debug",
"debug-test": "npm run test-local -- --inspect"
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/source/zh-cn/core/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ DevTools → chrome-devtools://devtools/bundled/inspector.html?experiments=true&
"cwd": "${workspaceRoot}",
"runtimeExecutable": "npm",
"windows": { "runtimeExecutable": "npm.cmd" },
"runtimeArgs": [ "run", "debug", "--", "--inspect-brk" ],
"runtimeArgs": [ "run", "debug" ],
"console": "integratedTerminal",
"protocol": "auto",
"restart": true,
Expand Down
34 changes: 11 additions & 23 deletions docs/source/zh-cn/tutorials/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -404,26 +404,8 @@ declare module 'egg' {

```json
{
"devDependencies": {
"egg-ts-helper": "^1"
},
"scripts": {
"dev": "egg-bin dev -r egg-ts-helper/register",
"test-local": "egg-bin test -r egg-ts-helper/register",
"clean": "ets clean"
}
}
```

在最新版本的 egg-bin 中,我们还支持通过配置 `egg.require` 来简化 scripts 配置:

```json
{
"devDependencies": {
"egg-ts-helper": "^1"
},
"egg": {
"require": [ "egg-ts-helper/register" ]
"declarations": true
},
"scripts": {
"dev": "egg-bin dev",
Expand Down Expand Up @@ -466,10 +448,13 @@ describe('test/app/service/news.test.js', () => {
```json
{
"name": "showcase",
"egg": {
"declarations": true
},
"scripts": {
"test": "npm run lint -- --fix && npm run test-local",
"test-local": "egg-bin test -r egg-ts-helper/register",
"cov": "egg-bin cov -r egg-ts-helper/register",
"test-local": "egg-bin test",
"cov": "egg-bin cov",
"lint": "tslint ."
}
}
Expand All @@ -482,9 +467,12 @@ describe('test/app/service/news.test.js', () => {
```json
{
"name": "showcase",
"egg": {
"declarations": true
},
"scripts": {
"debug": "egg-bin debug -r egg-ts-helper/register",
"debug-test": "npm run test-local -- --inspect"
"debug": "egg-bin debug",
"debug-test": "npm run test-local"
}
}
```
Expand Down

0 comments on commit 2357fbc

Please sign in to comment.