loopbackio / loopbackio/loopback-next

npm start build stuff and is too slow

オープン
#7,684 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Build developer-experience feature
主要言語
TypeScript
スター
5.1k
フォーク
1.1k
平均マージ
2日 21時間
マージ済み PR(30日)
27

説明

On a project made with the cli npm start launch the following command:

` "start": "node -r source-map-support/register .",`

This basically clean and build the full project and then start it in a dev mode.

This command can take forever to run. Azure App Service ping app and has a 230 timeout before they shutdown the container. On a small instance, the container will be shutdown before loopback has a chance to start. It's anyway a waste of ressource has Azure run build (in the build process, so no timeout) and then start (in startup script).

I belive npm start should run `"start": "node ./dist/index.js",` instead. A specific command for dev could be introduced such as `"dev": "npm run build && node -r source-map-support/register .",`.

Those are my current scripts:
```
"scripts": {
"build": "npm run clean & npm run copy-files && lb-tsc",
"build:watch": "lb-tsc --watch",
"pretest": "npm run build",
"migrate": "npm run build && node ./dist/migrate",
"openapi-spec": "npm run build && node ./dist/openapi-spec",
"dev": "npm run build && node -r source-map-support/register .",
"start": "node ./dist/index.js",
"clean": "lb-clean dist *.tsbuildinfo .eslintcache",
"copy-files": "mkdir -p dist && cp -r ./backend ./src/data ./dist"
},
```

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

issue に示されているプロジェクトの npm スクリプトから始め、ビルド済みの dist 出力から CLI がどのように起動するかを確認します。npm start が再ビルドせずにビルド済みのエントリーポイントを起動するようにし、ビルドして実行する動作のための開発用コマンドを残し、両方のコマンドが意図した役割を維持していることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
nodejs, typescript
領域
build-system, developer-experience
issue の種類
機能追加
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。