File tree 1 file changed +2
-16
lines changed
1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change 1
- say "Copying Tailwindcss JavaScript"
2
- directory "#{ __dir__ } /app/assets/javascripts" , "app/assets/javascripts"
3
- empty_directory "app/assets/javascripts/libraries"
4
-
5
- say "Add app/javascripts to asset pipeline manifest"
6
- append_to_file Rails . root . join ( "app/assets/config/manifest.js" ) . to_s , "//= link ./stylesheets/tailwind\n "
7
-
8
1
APPLICATION_LAYOUT_PATH = Rails . root . join ( "app/views/layouts/application.html.erb" )
9
2
10
3
if APPLICATION_LAYOUT_PATH . exist?
11
4
say "Add Tailwindcss include tags in application layout"
12
- insert_into_file Rails . root . join ( "app/views/layouts/application.html.erb" ) . to_s , " \n <%= tailwindcss_include_tags %>" , before : /\s *<\/ head> /
5
+ insert_into_file Rails . root . join ( "app/views/layouts/application.html.erb" ) . to_s , %( \n <%= stylesheet_link_tag "tailwind" %>) , before : /^ \s *<%= stylesheet_link_tag /
13
6
else
14
7
say "Default application.html.erb is missing!" , :red
15
- say " Add <%= tailwindcss_include_tags %> within the <head> tag in your custom layout."
8
+ say %( Add <%= stylesheet_link_tag "tailwind" %> within the <head> tag in your custom layout.)
16
9
end
17
-
18
- say "Turn off development debug mode"
19
- comment_lines Rails . root . join ( "config/environments/development.rb" ) , /config.assets.debug = true/
20
-
21
- say "Turn off rack-mini-profiler"
22
- comment_lines Rails . root . join ( "Gemfile" ) , /rack-mini-profiler/
23
- run "bin/bundle" , capture : true
You can’t perform that action at this time.
0 commit comments