Sha256: 34d01b3da6bf9ce9c1a1916a8f0bda1d1abed403c6a30d6f5c22e4b5e55a757d

Contents?: true

Size: 954 Bytes

Versions: 4

Compression:

Stored size: 954 Bytes

Contents

require "tailwindcss-rails"

NO_PASSWORD_TAILWIND_COMPILE_COMMAND = "#{Tailwindcss::Engine.root.join("exe/tailwindcss")} -i #{NoPassword::Engine.root.join("app/assets/stylesheets/no_password/application.tailwind.css")} -o #{Rails.root.join("app/assets/builds", "no_password/tailwind.css")} -c #{Rails.root.join("app/assets/config/no_password/tailwind.config.js")}"

namespace :no_password do
  namespace :tailwindcss do
    desc "Build your Tailwind CSS"
    task :build do
      Rails::Generators.invoke("no_password:tailwind_config", ["--force"])
      system NO_PASSWORD_TAILWIND_COMPILE_COMMAND
    end

    desc "Watch and build your Tailwind CSS"
    task :watch do
      Rails::Generators.invoke("no_password:tailwind_config", ["--force"])
      system "#{NO_PASSWORD_TAILWIND_COMPILE_COMMAND} -w"
    end
  end
end

if Rake::Task.task_defined?("assets:precompile")
  Rake::Task["assets:precompile"].enhance(["no_password:tailwindcss:build"])
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
no_password_auth-0.4.1 lib/tasks/tailwind.rake
no_password_auth-0.4.0 lib/tasks/tailwind.rake
no_password_auth-0.3.0 lib/tasks/tailwind.rake
no_password_auth-0.2.1 lib/tasks/tailwind.rake