ionic-team / ionic-team/ionic-cli

CLI Hooks ionic:serve:before is blocking ionic serve

Đang mở
#2,661 4 bình luận 1 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
TypeScript
Star
2k
Fork
682
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

**Description:**

Defining an `ionic:watch:before` hook with a blocking script (e.g. an express server startup) will block `ionic serve`. Since the close resemblance to `npm hook scripts` it is expected to execute in a similar way; where `prestart` is non blocking for `start`.

**Steps to Reproduce:**

Clone repo: https://github.com/dnmd/cli-hooks

#### First

```bash
$ npm install
```
---

#### Non-blocking behaviour

```bash
$ npm start
```

This will executed both the `prestart` and `start` script.

---

#### Blocking behaviour

```bash
$ ionic serve
```

This will **only** execute the `ionic:watch:before` script.

#### Behaviour

When running `ionic serve`, the `ionic:watch:before` script is executed and opens a new terminal window, but **doesn't continue** the execution of `ionic serve`. When running `npm start`, the `prestart` script is executed and opens a new terminal window and **does continue** the execution of `start`.

**My `ionic info`:**
cli packages:

@ionic/cli-utils : 1.8.1
ionic (Ionic CLI) : 3.8.1

global packages:

Cordova CLI : 7.0.1

local packages:

@ionic/app-scripts : 2.1.3
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.6.0

System:

Node : v6.6.0
npm : 3.10.3
OS : Windows 10

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.