该框架用于快速建立npm组件库
|-lib //打包后的文件
|-packages // 组件源文件
|-src // 用于测试验证
npm install
npm run serve
npm run build-pkg
npm run lint
npm publish --access public
npm login
npm whoami // 查询登录状态
import PersonalComponents from '@luxiaodan/personal-component'
import '@luxiaodan/personal-component/lib/personal-component.css'
Vue.use(PersonalComponents)
// babel.config.js
'plugins': [
[
'component',
{
libraryName: "@luxiaodan/personal-component",
style: true
}
]
],
// main.js
import { Message } from '@luxiaodan/personal-component'
Vue.component(Message.name, Message);