Sha256: f51a8a4c9f44b8efd3615971854b90c295afb8d2236290db10189b6605730dba
Contents?: true
Size: 1.27 KB
Versions: 21
Compression:
Stored size: 1.27 KB
Contents
module MagLove module Command class Copy include Commander::Methods def run task :base_images, theme: "!", pattern: "images/**/*.{jpg,png,gif,svg}" do |args, options| pattern = options.pattern.gsub(theme_base_path("", options.theme), "") theme_base_glob(pattern, options.theme).each do |file| asset = base_theme_asset(file, options.theme) debug("▸ created #{asset.logical_path}") if asset.write! end end task :images, theme: "!", pattern: "images/**/*.{jpg,png,gif,svg}" do |args, options| pattern = options.pattern.gsub(theme_path("", options.theme), "") theme_glob(pattern, options.theme).each do |file| asset = theme_asset(file, options.theme) debug("▸ created #{asset.logical_path}") if asset.write! end end task :thumbs, theme: "!", pattern: "thumbs/**/*.{jpg,png,gif,svg}" do |args, options| pattern = options.pattern.gsub(theme_path("", options.theme), "") theme_glob(pattern, options.theme).each do |file| asset = theme_asset(file, options.theme) debug("▸ created #{asset.logical_path}") if asset.write! end end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems