https://github.com/chrisvfritz/hello-vue-components
An example component library built with Vue CLI 3.
https://github.com/chrisvfritz/hello-vue-components
Last synced: 17 days ago
JSON representation
An example component library built with Vue CLI 3.
- Host: GitHub
- URL: https://github.com/chrisvfritz/hello-vue-components
- Owner: chrisvfritz
- License: mit
- Created: 2018-10-21T20:24:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T12:45:54.000Z (over 2 years ago)
- Last Synced: 2025-03-29T08:08:50.232Z (24 days ago)
- Language: JavaScript
- Homepage:
- Size: 2.38 MB
- Stars: 315
- Watchers: 17
- Forks: 42
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hello Vue Components
> An example component library built with Vue CLI 3.
## Usage
### Directly in the browser
Drop the library in with a `` tag alongside Vue to globally install all components:
```html
<div id="app">
<hello-a></hello-a>
<hello-b></hello-b>
</div><script src="https://unpkg.com/vue">
new Vue({ el: '#app' })
```
Or, if you only want to use a small subset of components, drop them in individually:
```html
new Vue({ el: '#app' })
```
### In a module system
Install the library with NPM:
```bash
npm install hello-vue-components
```Then register the library as a plugin to globally install all components:
```js
import HelloVueComponents from 'hello-vue-components'Vue.use(HelloVueComponents)
```Or, import components individually for local registration:
```js
import { HelloA, HelloB } from 'hello-vue-components'export default {
components: { HelloA, HelloB }
}
```#### Individually packaged components
If you only want to use a small subset of components, only import individually packaged components to reduce the size of your application:
```js
import HelloA from 'hello-vue-components.HelloA'
import HelloB from 'hello-vue-components.HelloB'
```