Class: Maquina::TailwindConfigGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Maquina::TailwindConfigGenerator
- Defined in:
- lib/generators/maquina/tailwind_config/tailwind_config_generator.rb
Instance Method Summary collapse
Instance Method Details
#configure_css ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/generators/maquina/tailwind_config/tailwind_config_generator.rb', line 17 def configure_css copy_file "app/assets/stylesheets/maquina.css" inject_into_file "app/assets/stylesheets/application.tailwind.css", after: /base"?;/ do %(\n@import "./maquina.css";) end end |
#create_generator ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/generators/maquina/tailwind_config/tailwind_config_generator.rb', line 7 def create_generator tailwind_config_file = "lib/generators/tailwind_config/templates/config/tailwind.config.js.tt" template "lib/tasks/tailwind.rake" template "lib/generators/tailwind_config/tailwind_config_generator.rb" # Seems that template can't handle .tt.tt extensions correctly copy_file tailwind_config_file, tailwind_config_file end |