Skip to content

Instantly share code, notes, and snippets.

@balinterdi
Last active July 3, 2019 16:16
Show Gist options
  • Save balinterdi/8dc9634efe6a0278e8533fd67fae9ed1 to your computer and use it in GitHub Desktop.
Save balinterdi/8dc9634efe6a0278e8533fd67fae9ed1 to your computer and use it in GitHub Desktop.
First stab at Embroider compat-adapter for ember-font-awesome
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