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

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