Last active
July 3, 2019 16:16
-
-
Save balinterdi/8dc9634efe6a0278e8533fd67fae9ed1 to your computer and use it in GitHub Desktop.
First stab at Embroider compat-adapter for ember-font-awesome
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import V1Addon from '../v1-addon'; | |
import { AddonMeta } from '@embroider/core'; | |
export default class EmberFontAwesome extends V1Addon { | |
get packageMeta(): Partial<AddonMeta> { | |
let meta = super.packageMeta; | |
meta['public-assets'] = { | |
'node_modules/font-awesome/fonts/FontAwesome.otf': '/fonts/FontAwesome.otf', | |
}; | |
for (let extension of ['eot', 'svg', 'ttf', 'woff', 'woff2']) { | |
let fileName = `fontawesome-webfont.${extension}`; | |
meta['public-assets'][`node_modules/font-awesome/fonts/${fileName}`] = `/fonts/${fileName}`; | |
} | |
return meta; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment