Class: Satis::Generators::TailwindConfigGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Satis::Generators::TailwindConfigGenerator
- Defined in:
- lib/generators/satis/tailwind_config_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_content_application_tailwind_css ⇒ Object
17 18 19 20 21 |
# File 'lib/generators/satis/tailwind_config_generator.rb', line 17 def add_content_application_tailwind_css inject_into_file "app/assets/stylesheets/application.tailwind.css", before: "@tailwind base;" do "@import '#{Satis::Engine.root}/app/assets/stylesheets/satis/application.css';\n" end end |
#add_content_to_tailwind_config ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/generators/satis/tailwind_config_generator.rb', line 9 def add_content_to_tailwind_config inject_into_file "config/tailwind.config.js", before: "],\n theme: {" do " // Satis content\n" + %w[/app/views/**/* /app/helpers/**/* /app/controllers/**/* /app/components/**/* /app/javascript/**/*.js /app/assets/**/*.css].map { |path| " \"#{Satis::Engine.root}#{path}\"" }.join(",\n") + ",\n " end end |