In an Ember-CLI project, if I add a directory containing webfonts and their CSS stylesheets to the public/assets
directory, I can use them with something like @import 'assets/font/regular/stylesheet.css
. This works fine.
Ideally though, I'd like to keep these assets out my git repository, and instead bower install
them as client-side dependencies, but how can these assets be used in the Ember-CLI build?
The documentation mentions app.import(FILE)
in Brocfile.js
, which works for CSS stylesheets, but not for a WOFF font file:
$ ember build
version: 0.0.28
Build failed.
Error: Path or pattern "nicefont.woff" did not match any files
at Object.multiGlob (/(PATH)/node_modules/ember-cli/node_modules/broccoli-static-compiler/node_modules/broccoli-kitchen-sink-helpers/index.js:216:13)
at /(PATH)/demo/node_modules/ember-cli/node_modules/broccoli-static-compiler/index.js:25:27
at invokeCallback (/(PATH)/node_modules/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/promise.js:228:21)
at publish (/(PATH)/node_modules/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/promise.js:176:9)
at publishFulfillment (/(PATH)/node_modules/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/promise.js:312:5)
at flush (/(PATH)/node_modules/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/asap.js:41:9)
Also, I would like to specify a directory, which is app.import()
refuses.
Is there an Ember-CLI / Brocolli way of doing this?