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
网友评论