How to test an `npm publish` result, without actually publishing to NPM?

后端 未结 4 932
暖寄归人
暖寄归人 2021-01-30 08:53

One common problem I have, is that sometimes my .npmignore file is too aggressive, and I ignore files that I actually will to include in the NPM tarball.

My question is

4条回答
  •  灰色年华
    2021-01-30 09:55

    (2019 answer)

    Simply run

    npm pack
    

    In npm 6 and up, this will display what files are going to be uploaded and create a tar ball in the current directory.

提交回复
热议问题