Skip to content

Commit

Permalink
Fix task
Browse files Browse the repository at this point in the history
  • Loading branch information
kawakamimoeki committed Oct 16, 2024
1 parent c11d2c8 commit fcb62d9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/tasks/clapton_tasks.rake
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
namespace :clapton do
task compile: :environment do
FileUtils.mkdir_p(Rails.root.join("public", "clapton")) unless Rails.root.join("public", "clapton").exist?
File.write(Rails.root.join("public", "clapton", "components.js"), File.read(File.join(__dir__, "..", "clapton", "javascripts", "dist", "components.js")))
File.write(Rails.root.join("public", "clapton", "client.js"), File.read(File.join(__dir__, "..", "clapton", "javascripts", "dist", "client.js")))
File.write(Rails.root.join("public", "clapton", "c.js"), File.read(File.join(__dir__, "..", "clapton", "javascripts", "dist", "c.js")))

Clapton::Engine.compile_components
puts "Clapton components compiled"
end
end

0 comments on commit fcb62d9

Please sign in to comment.