diff --git a/lib/install/stylesheets/application.scss b/lib/install/stylesheets/application.scss index 76fcadcc..e69de29b 100644 --- a/lib/install/stylesheets/application.scss +++ b/lib/install/stylesheets/application.scss @@ -1,3 +0,0 @@ -@import "tailwindcss/base"; -@import "tailwindcss/components"; -@import "tailwindcss/utilities"; diff --git a/lib/install/stylesheets/tailwindcss/after.scss b/lib/install/stylesheets/tailwindcss/after.scss new file mode 100644 index 00000000..1d6234e6 --- /dev/null +++ b/lib/install/stylesheets/tailwindcss/after.scss @@ -0,0 +1,2 @@ +@import "tailwindcss/components"; +@import "tailwindcss/utilities"; diff --git a/lib/install/stylesheets/tailwindcss/before.scss b/lib/install/stylesheets/tailwindcss/before.scss new file mode 100644 index 00000000..8510da38 --- /dev/null +++ b/lib/install/stylesheets/tailwindcss/before.scss @@ -0,0 +1 @@ +@import "tailwindcss/base"; diff --git a/lib/install/tailwindcss_with_webpacker.rb b/lib/install/tailwindcss_with_webpacker.rb index b80c637f..9b2be2d8 100644 --- a/lib/install/tailwindcss_with_webpacker.rb +++ b/lib/install/tailwindcss_with_webpacker.rb @@ -3,7 +3,10 @@ say "Installing Tailwind CSS" run "yarn add tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9" -insert_into_file "#{Webpacker.config.source_entry_path}/application.js", "\nimport \"stylesheets/application\"\n" +insert_into_file "#{Webpacker.config.source_entry_path}/application.js", + "\nimport \"stylesheets/tailwindcss/before\""\ + "\nimport \"stylesheets/application\""\ + "\nimport \"stylesheets/tailwindcss/after\"\n" say "Configuring Tailwind CSS" directory Pathname.new(__dir__).join("stylesheets"), Webpacker.config.source_path.join("stylesheets")