Skip to content

Commit

Permalink
πŸ”§ : configure vue-fontawesone
Browse files Browse the repository at this point in the history
  • Loading branch information
cdubuisson committed Apr 9, 2020
1 parent 50e55b8 commit 17eb2a2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/client/app/main.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import Vue from 'vue';

import fontawesomeConfig from '@/shared/config/fontawesome-config';

import App from './app.vue';
import router from './app-routes';

fontawesomeConfig.init();

Vue.config.productionTip = false;

new Vue({
router,
render: (h) => h(App),
router,
render: (h) => h(App),
}).$mount('#app');
23 changes: 23 additions & 0 deletions src/main/client/app/shared/config/fontawesome-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import Vue from 'vue';
import { library } from '@fortawesome/fontawesome-svg-core';
import {
faLock,
faUser,
} from '@fortawesome/free-solid-svg-icons';
import {
faGithub,
faGitlab,
} from '@fortawesome/free-brands-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';

export default {
init: () => {
library.add(
faUser,
faLock,
faGithub,
faGitlab,
);
Vue.component('font-awesome-icon', FontAwesomeIcon);
},
};

0 comments on commit 17eb2a2

Please sign in to comment.