Define destdir
Opened this issue · 1 comments
Globegitter commented
I am just trying to use your plugin, which works pretty great, but when I run for example broccoli build dist
it copies the images directly into the dist
folder rather than into an img
subfolder.
Even trying to use something like https://github.com/mjackson/broccoli-select doesn't seem to work.
So how can I define a destination folder/subfolder where all the images get copied into?
djmadeira commented
I know this is ancient and you've probably either moved on or solved it yourself, but for anybody who comes across this later: You can use broccoli-static-compiler to do this, for example:
var images = 'src/images';
images = pickFiles(images, {
srcDir: '/',
files: ['**/*.{gif,svg,png,jpg,jpeg}'],
destDir: '/img'
});
images = imagemin(images, {
progressive: true
});
where "destDir" is the relevant option there.