[RRFC] Ensure that binaries defined by the current package are recognized as available binaries inside itself by npm run

オープン
#673 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript
領域
cli, devtools

調査の方向性

まず、動機、サンプルの package manifest、およびリンクされている元の npm/cli issue #6141 を読みます。npm run が package のバイナリをどのように公開しているかを調査し、package 自身の bin をその scripts から利用できるようにするために必要な提案を決定します。実装できるほど明確に動作が仕様化されていれば完了です。

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

説明

Motivation ("The Why")

The motivations behind this is that it seems natural to me, even if a bit niche, and scripts defined like this are the cleanest possibly way to write them that I can think of:

{
  "name": "pkg",
  "bin": "./src/index.js",
  "scripts": {
     "something": "pkg something"
  }
}

Notice how the something script inside pkg references the pkg bin, i.e. itself.

Example

See above.

How
Current Behaviour

Currently running an npm run something leads to an error saying that pkg has not been found.

Desired Behaviour

npm run should take into consideration the binaries defined by the current package, and consider them as available binaries too.

References
主要言語
JavaScript
スター
780
フォーク
266
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

npm/rfcs のほかの issue

npm/rfcs の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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