Skip to content

Instantly share code, notes, and snippets.

@lukemelia
Created August 19, 2014 04:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukemelia/ea93844ae5b92b6e47ed to your computer and use it in GitHub Desktop.
Save lukemelia/ea93844ae5b92b6e47ed to your computer and use it in GitHub Desktop.
When you need an image to exist when your styles are processed by ember-cli
function AssetImporterPlugin(options, appName) {
this.name = 'yapp-asset-importer';
this.appName = appName;
this.options = options || {};
}
AssetImporterPlugin.prototype.treeFor = function treeFor(name) {
if (name !== "styles") { return; }
return pickFiles('shared-assets', {
srcDir: '/images',
destDir: '/assets/images'
});
};
app.project.addons.push(new AssetImporterPlugin(app.project));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment