gaowei1012 / blog

this is blog
2 stars 0 forks source link

git上传自己模块 #65

Open gaowei1012 opened 3 years ago

gaowei1012 commented 3 years ago

新建项目


mkdir d-tooljs && cd d-tooljs && npm init -y

配置package.json 配置项

{
  "name": "d-tooljs",
  "version": "0.0.2",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": ["tooljs"],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "prettier": "^2.2.1"
  },
  "dependencies": {
    "typescript": "^4.1.2"
  }
}

上传


cd d-tooljs && npm login  // 输入npmjs账号密码

npm publish
gaowei1012 commented 3 years ago

贴上自己的npm模块地址