@luxiaodan/personal-component
v1.0.3
Published
该框架用于快速建立npm组件库
Downloads
3
Readme
Vue npm组件库框架
该框架用于快速建立npm组件库
主要文件结构
|-lib //打包后的文件
|-packages // 组件源文件
|-src // 用于测试验证
Project setup
npm install
本地启动
npm run serve
打包
npm run build-pkg
Lints and fixes files
npm run lint
publish
npm publish --access public
组件库全部引用
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);