npm publish

2023-01-28  本文已影响0人  xueyueshuai

1.在abc目录中 准备两个文件

第一个 index.js或者是index.vue

code code code....

第二个 package.json

{
 "name": "xueyueshuai-test-publish",
 "version": "1.0.0",
 "description": "项目描述",
 "main": "index.js",
 "scripts": {
   "test": "echo \"Error: no test specified\" && exit 1"
 },
 "keywords": [
   "这里是关键词"
 ],
 "author": "xueyueshuai",
 "license": "ISC"
}

2.在abc目录中执行

npm login 先登录 输入账号密码
npm publish --access=public
上一篇 下一篇

猜你喜欢

热点阅读