Unified · Split
| @@ -1,2 +1 @@ | ||
| 1 | −public/icons | |
| 2 | −test | |
| 1 | +test | |
| @@ -15,7 +15,7 @@ class AssetsCLI < Thor · 14 unmodified lines | ||
| 15 | 15 | option :verbose, type: :boolean |
| 16 | 16 | def compile |
| 17 | 17 | load 'tasks/sprites.thor' |
| 18 | − invoke 'sprites:generate', [], :verbose => options[:verbose] | |
| 18 | + invoke 'sprites:generate', [], :remove_public_icons => true, :verbose => options[:verbose] | |
| 19 | 19 | |
| 20 | 20 | manifest.compile App.assets_compile |
| 21 | 21 | manifest.clean(options[:keep]) if options[:clean] |
| @@ -10,7 +10,8 @@ class SpritesCLI < Thor · 9 unmodified lines | ||
| 10 | 10 | super |
| 11 | 11 | end |
| 12 | 12 | |
| 13 | − desc 'generate [--verbose]', 'Generate the documentation icon spritesheets' | |
| 13 | + desc 'generate [--remove-public-icons] [--verbose]', 'Generate the documentation icon spritesheets' | |
| 14 | + option :remove_public_icons, type: :boolean, desc: 'Remove public/icons after generating the spritesheets' | |
| 14 | 15 | option :verbose, type: :boolean |
| 15 | 16 | def generate |
| 16 | 17 | items = get_items |
| @@ -44,6 +45,11 @@ class SpritesCLI < Thor · 27 unmodified lines | ||
| 44 | 45 | end |
| 45 | 46 | |
| 46 | 47 | save_manifest(items, icons_per_row, 'assets/images/sprites/docs.json') |
| 48 | + | |
| 49 | + if options[:remove_public_icons] | |
| 50 | + logger.info('Removing public/icons') | |
| 51 | + FileUtils.rm_rf('public/icons') | |
| 52 | + end | |
| 47 | 53 | end |
| 48 | 54 | |
| 49 | 55 | private |