Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

refactor: cleanup plugin, use single import for each set #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pimlie
Copy link

@pimlie pimlie commented Oct 4, 2019

feat: make layer components configurable
chore: update dependencies
test: add test for tree shaking

Thanks for this nuxt module, I use it very often! Have made some refactors to improve the overall usage. Let me know if you have any remarks.

Please also check the new addLayers and addLayersText options as I was not sure how I should name these. Feel free to suggest a better name

After this pr the plugin will look like this:

import Vue from 'vue'
import { library, config } from '@fortawesome/fontawesome-svg-core'
import {
  FontAwesomeLayers,
  FontAwesomeLayersText,
  FontAwesomeIcon
} from '@fortawesome/vue-fontawesome'

import {
  faCog as fortawesomefreesolidsvgicons_faCog,
  faCalendar as fortawesomefreesolidsvgicons_faCalendar,
  faHome as fortawesomefreesolidsvgicons_faHome,
  faCircle as fortawesomefreesolidsvgicons_faCircle,
  faCheck as fortawesomefreesolidsvgicons_faCheck
} from '@fortawesome/free-solid-svg-icons'

library.add(fortawesomefreesolidsvgicons_faCog)
library.add(fortawesomefreesolidsvgicons_faCalendar)
library.add(fortawesomefreesolidsvgicons_faHome)
library.add(fortawesomefreesolidsvgicons_faCircle)
library.add(fortawesomefreesolidsvgicons_faCheck)

config.autoAddCss = false

Vue.component('fa', FontAwesomeIcon)
Vue.component('fa-layers', FontAwesomeLayers)
Vue.component('fa-layers-text', FontAwesomeLayersText)

feat: make layer components configurable

chore: update dependencies

test: add test for tree shaking
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant