Sha256: 941d9cb0e1d9e40448ad23d462d2342b3445e54d4c0be51e67b48e784267cebb

Contents?: true

Size: 1017 Bytes

Versions: 65

Compression:

Stored size: 1017 Bytes

Contents

# Use the user provided asset or use the default
ASSET_FILE = ARGV[0] || "app/assets/builds/avo.tailwind.css" unless defined?(ASSET_FILE)
# Se the tailwindcss-rails package name
TAILWINDCSS_RAILS = "tailwindcss-rails"  unless defined?(TAILWINDCSS_RAILS)

# Check if tailwindcss-rails is being used
if Gem.loaded_specs.key? TAILWINDCSS_RAILS
  # Get the path
  GEM_PATH = Gem.loaded_specs[TAILWINDCSS_RAILS].full_gem_path
  # Compose the compile command
  AVO_TAILWIND_COMPILE_COMMAND = "#{RbConfig.ruby} #{Pathname.new(GEM_PATH)}/exe/tailwindcss -i '#{Rails.root.join("app/assets/stylesheets/avo.tailwind.css")}' -o '#{Rails.root.join(ASSET_FILE)}' -c '#{Rails.root.join("config/tailwind.config.js")}' --minify"

  namespace "avo:tailwindcss" do
    desc "Build your Tailwind CSS"
    task :build do
      system(AVO_TAILWIND_COMPILE_COMMAND, exception: true)
    end

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

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
avo-3.14.3 lib/tasks/tailwindcss_rails.rake
avo-3.14.2 lib/tasks/tailwindcss_rails.rake
avo-3.14.1 lib/tasks/tailwindcss_rails.rake
avo-3.14.0 lib/tasks/tailwindcss_rails.rake
avo-3.13.7 lib/tasks/tailwindcss_rails.rake
avo-3.13.6 lib/tasks/tailwindcss_rails.rake
avo-3.13.5 lib/tasks/tailwindcss_rails.rake
avo-3.13.4 lib/tasks/tailwindcss_rails.rake
avo-3.13.3 lib/tasks/tailwindcss_rails.rake
avo-3.13.2 lib/tasks/tailwindcss_rails.rake
avo-3.13.1 lib/tasks/tailwindcss_rails.rake
avo-3.13.0 lib/tasks/tailwindcss_rails.rake
avo-3.12.0 lib/tasks/tailwindcss_rails.rake
avo-3.11.10 lib/tasks/tailwindcss_rails.rake
avo-3.11.9 lib/tasks/tailwindcss_rails.rake
avo-3.11.8 lib/tasks/tailwindcss_rails.rake
avo-3.11.7 lib/tasks/tailwindcss_rails.rake
avo-3.11.6 lib/tasks/tailwindcss_rails.rake
avo-3.11.5 lib/tasks/tailwindcss_rails.rake
avo-3.11.4 lib/tasks/tailwindcss_rails.rake