Created
August 19, 2014 04:11
-
-
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
This file contains hidden or 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
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