Skip to content
This repository has been archived by the owner. It is now read-only.
A template for create a Vue Plugin with Rollup
JavaScript Vue
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
packages/HelloWorld
tests/unit
.babelrc
.editorconfig
.eslintignore
.eslintrc.js
.gitignore
.travis.yml
CONTRIBUTING.md
LICENSE
README.md
index.js
jest.config.js
logotype.png
package.json
rollup.config.js
yarn.lock

README.md

A template for create a Vue Plugin with Rollup


Install/Usage

# Install with npm
$ npm i -S vue-template-plugin

# or yarn
$ yarn add vue-template-plugin
<div id="app">
  <HelloWorld :message="message" />
</div>

You can use Local Registration:

import { HelloWorld } from 'vue-template-plugin';
new Vue({
  el: '#app',
  data() {
    return {
      message: 'Hello World',
    };
  },
  components: {
    HelloWorld,
  },
});

or Global Registration:

import HelloWorld from 'vue-template-plugin';
Vue.use(HelloWorld);

// or with a custom component name
import { HelloWorld } from 'vue-template-plugin';
Vue.component('custom-hello-world', HelloWorld);

Usage in browser

In browser you can use Unpkg, Jsdelivr, CDN.js, etc.

# Unpkg
https://unpkg.com/vue-template-plugin@latest/dist/vue-template-plugin.js

# JSDelivr
https://cdn.jsdelivr.net/npm/vue-template-plugin@latest/dist/vue-template-plugin.min.js

Documentation

Props

Name Description Type Required
message The message property that will be displayed String false

Community

All feedback and suggestions are welcome!

License

This is a open-source software licensed under the MIT license

You can’t perform that action at this time.