Skip to content

Allow the puma plugin to enable "debug" (no minification) #400

Closed as not planned
@richardkmichael

Description

@richardkmichael

It would be helpful if the puma plugin could permit configuration of the TailwindCSS watcher in debug mode (to generate non-minified output). It seems this is only possible when starting the watcher using rake task (and therefore also a Procfile).

The Puma configuration DSL plugin does not accept arguments other than the plug-in name, so this can't be implemented as: plugin :tailwindcss, :debug.

It could be done with an environment variable . (The plug-in already uses environment for TAILWINDCSS_INSTALL_DIR.)

A simple patch:

# lib/puma/plugin/tailwindcss.rb

def start(launcher)
    debug = ["true", "1"].include? ENV["TAILWINDCSS_DEBUG"]
    # ...
        IO.popen(Tailwindcss::Commands.watch_command(debug: debug), 'r+') do |io|
    # ...
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions