This is the npm package template to create and publish vue.js plugin by yourself.
You need your NPM account to publish your own package. If you don't have the account, let's register on NPM.
Run the command to install dependencies and initialize your package.
$ yarn install
$ yarn init
There will be some questions as below.
- name
- version
- description
- entrypoint
- repository
- author
- license
- private
I recommend that you set entrypoint
to index.js
(default) because of default setting in tsconfig.json
.
You can create your plugin in src/
.
Run the command to build your typescript code.
$ yarn build
Before publication, commit your code and create version tag on your repository.
Run the command to publish your package.
$ npm adduser
$ npm publish ./