[Node] Prepare a package to be published to npm

Posted answer1215

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[Node] Prepare a package to be published to npm相关的知识,希望对你有一定的参考价值。

In package.json file:

    "prepare": "npm run build",
    "postpublish": "git push --tags",

 

"prepare": make sure we don‘t forget to run build before publish the package

"postpublish": make sure after we publish the package, we also send tags to git

 

When we want to udpate the package version, we need to use "npm version [options]"

以上是关于[Node] Prepare a package to be published to npm的主要内容,如果未能解决你的问题,请参考以下文章

node 和 reactrewired 修改 React 打包目录的流程

node 和 npm GitLab 的 node-sass 版本问题

node 和 react-app-rewired 修改 React 打包目录的流程

node 和 react-app-rewired 修改 React 打包目录的流程

node怎么查看package.json文件

软件版本号规范与命名原则(node.js与package.json依赖包规范)