npmとかwebpackとか
npmとかwebpackとか...なんというか、確信をもってWebに記事を書いている人って、少なそう。試行錯誤して、なんとなく動いているので、これでいいや、という感じの記事が多い印象。初心者であるおいらは、もちろん、そうなのだが...
とりあえず、さっき知って嬉しかったのは、これ。
package.jsonに"private": trueを追加すると、repositoryフィールドがないよ、という警告が出なくなる。
正しい。実際、そういうつもりだから。
公式のドキュメントにも説明があった。
If you set
"private": true
in your package.json, then npm will refuse to publish it.This is a way to prevent accidental publication of private repositories. If you would like to ensure that a given package is only ever published to a specific registry (for example, an internal registry), then use the
publishConfig
dictionary described below to override theregistry
config param at publish-time.
というわけで本家のドキュメントも折にふれて読みましょう。