portagenetwork / roadmap

Developed by the the Alliance in collaboration with University of Alberta, DMP Assistant a data management planning tool, forking the DMP Roadmap codebase
MIT License
6 stars 1 forks source link

Address Unnecessary Copying of Assets When Executing `rails` commands #956

Open aaronskiba opened 16 hours ago

aaronskiba commented 16 hours ago

Please complete the following fields as applicable:

What version of the DMPRoadmap code are you running? (e.g. v2.2.0)

Encountered behaviour:

puts "Copying TinyMCE skins to the public directory ..." source_dir = Dir.glob(Rails.root.join('node_modules', 'tinymce', 'skins', 'ui', 'oxide')) destination_dir = Rails.root.join('public', 'tinymce', 'skins') FileUtils.mkdir_p(destination_dir) FileUtils.cp_r(source_dir, destination_dir)



**Remedy:**
Move this aforementioned code outside of `config/initializers/` (Perhaps it'd be best if it was only executed as part of `rails assets:precompile`?).