Created
May 11, 2015 13:18
-
-
Save tokenvolt/76bb62a7cfdbc0238cf8 to your computer and use it in GitHub Desktop.
Webpack rake tasks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :webpack do | |
desc 'create symlinks for images and fonts' | |
task symlink: :environment do | |
images_target = Rails.root.join('app', 'assets', 'images/') | |
fonts_target = Rails.root.join('app', 'assets', 'fonts/') | |
images_link = Rails.root.join('client', 'assets', 'images/') | |
fonts_link = Rails.root.join('client', 'assets', 'fonts/') | |
FileUtils.mkdir_p(images_link) | |
FileUtils.mkdir_p(fonts_link) | |
puts images_link | |
puts fonts_link | |
# unless images_link.symlink? | |
# puts 'images' | |
# File.symlink(images_target, images_link) | |
# end | |
unless fonts_link.symlink? | |
puts 'fonts' | |
File.symlink(fonts_target, fonts_link) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment