nanoc / features

Collection of feature requests
2 stars 1 forks source link

Allow rewinding to a previous snapshot #61

Open denisdefreyne opened 2 years ago

denisdefreyne commented 2 years ago

Example:

compile '/assets/images/*.png' do
  filter :resize
  snapsnot :uncompressed
  write item.identifier.without_ext + '.png'

  filter :webp
  write item.identifier.without_ext + '.webp'
  rewind_to :uncompressed

  filter :avif
  write item.identifier.without_ext + '.avif'
end
gpakosz commented 2 years ago

As long as the compile block execution is serial, I believe this could go a long way.

This has the benefit of not messing with the concept of a :last snapshot.