react npm 包_如何构建自己的react软件包并在另一个项目中安装npm

react npm 包

If you ever want to publish your own library, you will need to upload a new project onto Github.

如果您想发布自己的库,则需要将新项目上载到Github。

In this tutorial, I will teach all of you how to create your own react project, upload it to GitHub, create another react project, and uploading the initially created project as a package.

在本教程中,我将教大家如何创建自己的React项目,将其上传到GitHub,创建另一个React项目以及将最初创建的项目作为包上传。

To begin, you need to install node on your machine with the following command:

首先,您需要使用以下命令在计算机上安装节点:

  • curl “https://nodejs.org/dist/latest/node-${VERSION:-$(wget -qO- https://nodejs.org/dist/latest/ | sed -nE ‘s|.*>node-(.*)\.pkg</a>.*|\1|p’)}.pkg” > “$HOME/Downloads/node-latest.pkg” && sudo installer -store -pkg “$HOME/Downloads/node-latest.pkg” -target “/”

    卷曲“ https://nodejs.org/dist/latest/node-${VERSION:-$(wget -qO- https://nodejs.org/dist/latest/ | sed -nE's |。*> node -(。*)\。pkg </a>。* | \ 1 | p')}。pkg”>“ $ HOME / Downloads / node-latest.pkg” && sudo安装程序-store -pkg“ $ HOME / Downloads /node-latest.pkg”-目标“ /”

Now create a folder and create index.js. Index.js is where you will be exporting your functions from the package.

现在创建一个文件夹并创建index.js。 Ind

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值