Sha256: 992ad61c12f3e86960fd06acbd03c9cf57a1b598f05fd1aa2773971c53b30bdf

Contents?: true

Size: 797 Bytes

Versions: 6

Compression:

Stored size: 797 Bytes

Contents

TAILWIND_COMPILE_COMMAND = "#{Pathname.new(__dir__).to_s}/../../exe/tailwindcss -i #{Rails.root.join("app/assets/stylesheets/application.tailwind.css")} -o #{Rails.root.join("app/assets/builds/tailwind.css")} -c #{Rails.root.join("config/tailwind.config.js")}"

namespace :tailwindcss do
  desc "Build your Tailwind CSS"
  task :build do
    system TAILWIND_COMPILE_COMMAND
  end

  desc "Watch and build your Tailwind CSS on file changes"
  task :watch do
    system "#{TAILWIND_COMPILE_COMMAND} -w"
  end
end

Rake::Task["assets:precompile"].enhance(["tailwindcss:build"])

if Rake::Task.task_defined?("test:prepare")
  Rake::Task["test:prepare"].enhance(["tailwindcss:build"])
elsif Rake::Task.task_defined?("db:test:prepare")
  Rake::Task["db:test:prepare"].enhance(["tailwindcss:build"])
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tailwindcss-rails-2.0.5-x64-mingw32 lib/tasks/build.rake
tailwindcss-rails-2.0.5-arm64-darwin lib/tasks/build.rake
tailwindcss-rails-2.0.5 lib/tasks/build.rake
tailwindcss-rails-2.0.5-x86_64-linux lib/tasks/build.rake
tailwindcss-rails-2.0.5-x86_64-darwin lib/tasks/build.rake
tailwindcss-rails-2.0.5-aarch64-linux lib/tasks/build.rake