You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: rakelib/test.rake
+31-18Lines changed: 31 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -63,11 +63,16 @@ namespace :test do
63
63
puts'No issues found'.green
64
64
end
65
65
66
-
desc'Find unused images'
66
+
desc'Find unused images. To exclude by regex pattern, use the "exclude_img" argument. Example of excluding a "layout" directory: "rake test:unused_includes exclude_img=/layout/"'
67
67
task:unused_imagesdo
68
-
puts'Running a task for finding unused images'.magenta
69
-
images=Dir['src/**/*.{png,svg,jpeg,jpg,ico}']
68
+
puts'Running a task for finding unused images (png,svg,jpeg,jpg,ico)'.magenta
desc'Find unused includes. To exclude by regex pattern, use the "exclude_incl" argument. Example of excluding a "layout" directory: "rake test:unused_includes exclude_incl=/layout/"'
88
95
task:unused_includesdo
89
96
puts'Running a task to find unused _includes'.magenta
90
-
includes=Dir['src/_includes/**/*']
97
+
includes=FileList['src/_includes/**/*']
98
+
91
99
puts"The project contains a total of #{includes.size} includes"
puts'Be careful removing include files. Some include files, such as those in the layout/** directory, may not be linked in the project, but may be used implicitly by the doc theme.'.bold
puts'Be careful removing include files. Some include files, such as those in the layout/** directory, may not be linked in the project, but may be used implicitly by the doc theme.'.bold
0 commit comments