1. mkdir add-number (创建文件夹)
2. cd add-number
3. git init
4.git remote add origin https://github.com/minfei/add-number.git
5.touch README.md
6.git status git add -A git commit git push git push --set-upstream origin master
7.npm init
8. npm install babel-cli babel-preset-latest --save-dev 添加:("dev":"watch 'npm run build ' src", "build":"babel src -d build",)
9.npm install watch jest --save-dev 添加("test:watch":"npm test -- --watch","test":"jest", )
10.添加index.js,index.test.js
11.npm run test:watch(成功)
12.npm link(把本地包放到全局环境下)
13.新增项目 npm link 公用包 引用包
14.npm adduser(package 里 author 可能要改)
15.npm publish
网友评论