Sha256: 14b272f3a1656460d0b787d325fb0750e81742f4ffbe06f505fbe7e2f957a491

Contents?: true

Size: 946 Bytes

Versions: 65

Compression:

Stored size: 946 Bytes

Contents

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

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

65 entries across 65 versions & 4 rubygems

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