diff options
author | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2020-02-08 11:56:32 -0800 |
---|---|---|
committer | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2020-02-08 11:56:32 -0800 |
commit | aa503dd5397cb358a1b88b5b9c26aa47e3bd1a95 (patch) | |
tree | 6dc850a5e04b1e4d4148f5417caf3745b582341f | |
parent | 4de89ab2216d0b1918413ee34cf0d1f91e44ec66 (diff) |
Allow copying statics in deeper directories
-rw-r--r-- | lib/statics.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/statics.rb b/lib/statics.rb index 3865439..520e213 100644 --- a/lib/statics.rb +++ b/lib/statics.rb @@ -1,7 +1,8 @@ def write_statics statics - statics = statics.map do | filename | - src filename + statics = statics.each do | filename | + source = src filename + target = build filename + FileUtils.mkdir_p(File.dirname target) + FileUtils.cp_r source, target end - - FileUtils.cp statics, BuildDir end |