๐ An example component library built with Vue CLI 3
Drop the library in with a <script>
tag alongside Vue to globally install all components:
<div id="app">
<hello-a></hello-a>
<hello-b></hello-b>
</div>
<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/@binalogue/skeleton-vue-components"></script>
<script>
new Vue({ el: '#app' })
</script>
Or, if you only want to use a small subset of components, drop them in individually:
<div id="app">
<hello-a></hello-a>
<hello-b></hello-b>
</div>
<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/@binalogue/skeleton-vue-components/HelloA"></script>
<script src="https://unpkg.com/@binalogue/skeleton-vue-components/HelloB"></script>
<script>
new Vue({ el: '#app' })
</script>
Install the library with NPM:
npm install @binalogue/skeleton-vue-components
Then register the library as a plugin to globally install all components:
import BinawebVueComponents from '@binalogue/skeleton-vue-components'
Vue.use(BinawebVueComponents)
Or, import components individually for local registration:
import { HelloA, HelloB } from '@binalogue/skeleton-vue-components'
export default {
components: { HelloA, HelloB }
}
If you only want to use a small subset of components, only import individually packaged components to reduce the size of your application:
npm install @binalogue/skeleton-vue-components.hello-a
npm install @binalogue/skeleton-vue-components.hello-b
import HelloA from '@binalogue/skeleton-vue-components.hello-a'
import HelloB from '@binalogue/skeleton-vue-components.hello-b'
- Vue CLI - Standard Tooling for Vue.js Development
- Mikel Goig - Initial work - mgoigfer
If you are using our skeleton to set up your own Vue components library, please send us a postcard from your hometown.
Our address is: Binalogue, Calle de Gรฉnova, 11, 3D, 28004 Madrid, Spain.
This project is licensed under the MIT license.
This repository is inspired by chrisvfritz/hello-vue-components.