vue-template-plugin
<vue-template-plugin>
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
Dependencies
Dependencies
@vue/test-utils: ^1.0.0-beta.29babel-core: ^6.26.3babel-eslint: ^10.0.2babel-jest: ^24.8.0babel-preset-env: ^1.7.0eslint: ^6.0.1eslint-config-airbnb-base: ^13.2.0eslint-plugin-import: ^2.18.0eslint-plugin-vue: ^5.2.3jest: ^24.8.0jest-serializer-vue: ^2.0.2jest-transform-stub: ^2.0.0rimraf: ^2.6.3rollup: ^1.16.3rollup-plugin-commonjs: ^10.0.1rollup-plugin-css-only: ^1.0.0rollup-plugin-node-resolve: ^5.2.0rollup-plugin-terser: ^5.0.0rollup-plugin-vue: ^5.0.1vue-jest: ^3.0.4vue-template-compiler: ^2.6.10