npm 包给共享,团队写做有好多问题须要解决,相似的解决方案有lerna yarn 使用monorepo,bit 官方有相关的比较
如下只说明如何进行简单的项目使用html
网站 https://bitsrc.iogit
npm install bit-bin -g
bit init
├── bit.json ├── index.js └── src └── components ├── button │ └── index.js ├── login │ └── index.js └── logo └── index.js
mkdir -p src/components/{button,login,logo} bit add src/components/*
bit tag --all 1.0.0
bit login bit export username.scopename
https://docs.bitsrc.io/
https://github.com/teambit/bit
https://docs.bitsrc.io/docs/faq-what-is-bit.htmlgithub