hivemind-widget

Web component widget for hivemind
1,325
Install
npm install hivemind-widget
Latest Version:1.6.3
Vue:2
License:MIT
Last Updated:Apr 26, 2019
Links: GitLab  ·  npm
Maintainer: davigmacode

Hivemind Widget

Example using Rollup to bundle one or many Vue.js components into a single .js file that can be used in any HTML/JS application.

Refer to this post on vuetips.com for more information.

<html>
  <body>

    ...

    <my-vue-component/>
    <!-- you can add many instances of the component in the same page -->
    <my-vue-component/>

    <script src="my-vue-component.js"></script>

  </body>
</html>

How it works

Components are registered in src/main.js.

Component code is in src/components/ComponentName.vue.

To add a component :

  • Add a .vue file in src/components
  • Register the component in src/main.js

Development

To test your components :

  • Launch rollup : npm run dev (watch mode)
  • Open demo/index.html in a browser
  • Edit src/main.js or your component file
  • Refresh the page

Bundle a release

npm run build

File will be placed in dist/my-vue-component.js.

Refer to rollup.config.js for customization options.

Version History

Version Released Vue License
1.6.3 ^2.2.6 MIT
1.6.2 ^2.2.6 MIT
1.6.1 ^2.2.6 MIT
1.6.0 ^2.2.6 MIT
1.5.8 ^2.2.6 MIT