Module: Tailwindcss::Commands

Defined in:
lib/tailwindcss/commands.rb

Class Method Summary collapse

Class Method Details

.compile_command(debug: false, config_path: nil, postcss_path: nil, **kwargs) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/tailwindcss/commands.rb', line 6

def compile_command(debug: false, config_path: nil, postcss_path: nil, **kwargs)
  command = [
    Tailwindcss::Ruby.executable(**kwargs),
    "--input", "-"
  ]
  command += ["--config", config_path] if config_path
  command += ["--postcss", postcss_path] if postcss_path

  command << "--minify" unless debug

  command
end