borodean / postcss-assets

An asset manager for PostCSS
MIT License
537 stars 32 forks source link

Ability to delete assets after inlining. #48

Closed DylanPiercey closed 7 years ago

DylanPiercey commented 8 years ago

This feature could be useful for builds where images are also optimized and copied into a bin folder. This way there wouldn't have to be a public facing copy of the image and the dist folder can be smaller.

borodean commented 8 years ago

@DylanPiercey please share your ideas on how this could work. If the plugin would just delete the inlined files, it would fail to inline them again on the next compilation.

DylanPiercey commented 8 years ago

In my proposed scenario the files would have been built/optimized by a tool an would be rebuilt before each css build.

mabar commented 7 years ago

Images should be optimized only when changed. And manipulating so much with filesystem in CSS sounds like a side effect. Just delete them yourself after compilation if it is required.

DylanPiercey commented 7 years ago

@mabar fair enough. I'm using web pack for this now anyways :).