Skip to content

Instantly share code, notes, and snippets.

@harrytran998
Last active January 13, 2020 16:56
Show Gist options
  • Save harrytran998/b422b8227a66c3f8486bf07cfdbd6a88 to your computer and use it in GitHub Desktop.
Save harrytran998/b422b8227a66c3f8486bf07cfdbd6a88 to your computer and use it in GitHub Desktop.
Store the plugin of vueJS
import Vue from 'vue'
import {
LayoutPlugin,
BCard,
BCardBody,
BCardTitle,
BCardText,
BCardGroup,
BButton,
} from 'bootstrap-vue'
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
Vue.use(LayoutPlugin, { breakpoints: ['sm', 'lg', 'xl', 'xxl'] })
Vue.component('b-card', BCard)
Vue.component('b-card-body', BCardBody)
Vue.component('b-card-title', BCardTitle)
Vue.component('b-card-text', BCardText)
Vue.component('b-card-group', BCardGroup)
Vue.component('b-button', BButton)
import Vue from 'vue'
import { library, config } from '@fortawesome/fontawesome-svg-core'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import {
faEnvelope,
faPhone,
faComments,
faCouch,
faRulerCombined,
faHotel,
faUtensils,
faDungeon,
faCaretDown,
faArrowRight,
} from '@fortawesome/free-solid-svg-icons'
// This is important, we are going to let Nuxt.js worry about the CSS
config.autoAddCss = false
// You can add your icons directly in this plugin. See other examples for how you
// can add other styles or just individual icons.
const icons = [
faEnvelope,
faPhone,
faComments,
faCouch,
faRulerCombined,
faHotel,
faUtensils,
faDungeon,
faCaretDown,
faArrowRight,
]
icons.forEach(icon => {
library.add(icon)
})
// Register the component globally
Vue.component('font-awesome-icon', FontAwesomeIcon)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment