Rakefile in foundation-rails-6.1.1.1 vs Rakefile in foundation-rails-6.1.1.2
- old
+ new
@@ -11,21 +11,23 @@
desc 'Update Foundation for Sites assets'
task update: :clean do
sh 'bower install'
sh 'cp -R bower_components/foundation-sites/js/* vendor/assets/js/'
sh 'cp -R bower_components/foundation-sites/scss/* vendor/assets/scss/'
+ sh 'cp -R bower_components/motion-ui/src/* vendor/assets/scss/motion-ui'
- manifest = Dir['vendor/assets/js/*.js'].
- map { |file| "//= require #{File.basename(file, '.js')}" }.
- sort.join("\n")
+ js_files = Dir['vendor/assets/js/*.js'].sort
+ # Move foundation.core.js to beginning of js_files
+ js_files.insert(0, js_files.delete(js_files.find { |file| file[/foundation.core.js/] }))
+ manifest = js_files.map { |file| "//= require #{File.basename(file, '.js')}" }.join("\n")
File.write('vendor/assets/js/foundation.js', manifest)
puts 'Now update version.rb'
end
desc 'Remove old Foundation for Sites assets'
task :clean do
sh 'rm -rf vendor'
- sh 'mkdir -p vendor/assets/js/ vendor/assets/scss'
+ sh 'mkdir -p vendor/assets/js/ vendor/assets/scss vendor/assets/scss/motion-ui'
end
end