mirror of
https://github.com/foo-dogsquared/website.git
synced 2025-01-31 07:58:02 +00:00
Add clean task for Rake
This commit is contained in:
parent
a751e4b337
commit
1b4c2e1a89
16
Rakefile
16
Rakefile
@ -89,3 +89,19 @@ desc 'Update the Hugo modules for this project'
|
|||||||
task :update do
|
task :update do
|
||||||
sh 'hugo mod get ./... && hugo mod tidy'
|
sh 'hugo mod get ./... && hugo mod tidy'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc 'Clean the environment'
|
||||||
|
task :clean do
|
||||||
|
# Remove the generated files.
|
||||||
|
generated_files_dir = [
|
||||||
|
'./public',
|
||||||
|
'./static/icons',
|
||||||
|
'./static/posts',
|
||||||
|
]
|
||||||
|
|
||||||
|
generated_files_dir.each do |dir|
|
||||||
|
if File.exist? dir then
|
||||||
|
FileUtils.rm_r dir, secure: true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user