You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

7 lines
375 B

# useful methods for figuring out which kind of process is running
module CommandDetection
def server? = Rails.const_defined?('Server')
def console? = !server? && defined?(Rails::Console) == 'constant'
def rake? = !server? && !console? && Rails.const_defined?('Rake')
def tailwind_watcher? = rake? && Rake.application.top_level_tasks.first == 'tailwindcss:watch'
end