Sha256: 41da104324634b83f58c2be4c9f951f3fb168904f931cb43628726cfd4f472d7
Contents?: true
Size: 1.09 KB
Versions: 64
Compression:
Stored size: 1.09 KB
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") always = args.extras.include?("always") command = Tailwindcss::Commands.watch_command(always: always, 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?("spec:prepare") Rake::Task["spec:prepare"].enhance(["tailwindcss:build"]) elsif Rake::Task.task_defined?("db:test:prepare") Rake::Task["db:test:prepare"].enhance(["tailwindcss:build"]) end
Version data entries
64 entries across 64 versions & 1 rubygems