loopbackio / loopbackio/loopback-next
npm start build stuff and is too slow
まだ誰も着手していません。
- 主要言語
- 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"
},
```
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
issue に示されているプロジェクトの npm スクリプトから始め、ビルド済みの dist 出力から CLI がどのように起動するかを確認します。npm start が再ビルドせずにビルド済みのエントリーポイントを起動するようにし、ビルドして実行する動作のための開発用コマンドを残し、両方のコマンドが意図した役割を維持していることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- nodejs, typescript
- 領域
- build-system, developer-experience
- issue の種類
- 機能追加
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100