0.1.2 • Published 3 years ago

wqfbuttonpackage v0.1.2

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

testpackage

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Lints and fixes files

npm run lint

Customize configuration

See Configuration Reference.

vue插件的编写

以写个可复用的为例

1.编写button组件,btn样式,btn接收的事件都要在组件中接收

2.将src文件夹重命名为example,新建文件夹为package,将写好的组件都copy到package中

3.在package中新建index.js文件,创建install方法,将所有组件使用Vue.component(name, 组件),并export install

4.创建vue.config.js文件,指定项目入口文件为example/index.js,并扩展webpack配置,使packages加入编译

5.npm run build,生成dist

6.上传到git

7.创建npmignore,把example,packages,public等文件加入npm上传忽略,只上传dist文件,并修改package.json文件中name,version,private一定要false,

8.npm publish

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago