mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
Remove public/icons from .slugignore and remove it later
This commit is contained in:
parent
50cd4e13a3
commit
1fd1ed9d23
3 changed files with 9 additions and 4 deletions
|
@ -1,2 +1 @@
|
|||
public/icons
|
||||
test
|
|
@ -15,7 +15,7 @@ class AssetsCLI < Thor
|
|||
option :verbose, type: :boolean
|
||||
def compile
|
||||
load 'tasks/sprites.thor'
|
||||
invoke 'sprites:generate', [], :verbose => options[:verbose]
|
||||
invoke 'sprites:generate', [], :remove_public_icons => true, :verbose => options[:verbose]
|
||||
|
||||
manifest.compile App.assets_compile
|
||||
manifest.clean(options[:keep]) if options[:clean]
|
||||
|
|
|
@ -10,7 +10,8 @@ class SpritesCLI < Thor
|
|||
super
|
||||
end
|
||||
|
||||
desc 'generate [--verbose]', 'Generate the documentation icon spritesheets'
|
||||
desc 'generate [--remove-public-icons] [--verbose]', 'Generate the documentation icon spritesheets'
|
||||
option :remove_public_icons, type: :boolean, desc: 'Remove public/icons after generating the spritesheets'
|
||||
option :verbose, type: :boolean
|
||||
def generate
|
||||
items = get_items
|
||||
|
@ -44,6 +45,11 @@ class SpritesCLI < Thor
|
|||
end
|
||||
|
||||
save_manifest(items, icons_per_row, 'assets/images/sprites/docs.json')
|
||||
|
||||
if options[:remove_public_icons]
|
||||
logger.info('Removing public/icons')
|
||||
FileUtils.rm_rf('public/icons')
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in a new issue