Sha256: a9d54a626b3bee6f8f8598d6e715181a7c7fe12840a79ad6ad8ea21c3b6f6a2b

Contents?: true

Size: 847 Bytes

Versions: 7

Compression:

Stored size: 847 Bytes

Contents

TAILWIND_COMPILE_COMMAND = "#{RbConfig.ruby} #{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")}' --minify"

namespace :tailwindcss do
  desc "Build your Tailwind CSS"
  task :build do
    system(TAILWIND_COMPILE_COMMAND, exception: true)
  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

7 entries across 7 versions & 1 rubygems

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