From aa503dd5397cb358a1b88b5b9c26aa47e3bd1a95 Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Sat, 8 Feb 2020 11:56:32 -0800 Subject: Allow copying statics in deeper directories --- lib/statics.rb | 9 +++++---- 1 file 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 -- cgit v1.2.3