Sha256: 651e9d3f4edf1b23555adb39e531b62b62a50f016a8f9d026cc38354256b8de8

Contents?: true

Size: 850 Bytes

Versions: 68

Compression:

Stored size: 850 Bytes

Contents

namespace :tailwindcss do
  desc "Build your Tailwind CSS"
  task :build do |_, args|
    debug = args.extras.include?("debug")
    command = Tailwindcss::Commands.compile_command(debug: debug)
    puts command.inspect
    system(*command, exception: true)
  end

  desc "Watch and build your Tailwind CSS on file changes"
  task :watch do |_, args|
    debug = args.extras.include?("debug")
    poll = args.extras.include?("poll")
    command = Tailwindcss::Commands.watch_command(debug: debug, poll: poll)
    puts command.inspect
    system(*command)
  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

68 entries across 68 versions & 1 rubygems

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