miniature-optician-85831
11/22/2023, 9:18 PMlate-noon-56486
11/22/2023, 9:18 PM--minify inside of the quotes in package.json.
bin/rails generate avo:tailwindcss:install said to use "scripts": { "avo:tailwindcss": "tailwindcss -i ./app/assets/stylesheets/avo.tailwind.css -o ./app/assets/builds/avo.tailwind.css -c ./config/tailwind.config.js" --minify } but that didn't look right.
Anyhoo - I'm confused as the linked files appear to have different paths.late-noon-56486
11/22/2023, 9:19 PMmanifest.js
javascript
//= link_tree ../images
//= link_directory ../stylesheets .css
//= link_tree ../../javascript .js
//= link_tree ../../../vendor/javascript .js
//= link_tree ../builds
^ I've noticed that the last line here is being added when I run bin/rails generate avo:tailwindcss:install. Removing prevents this error but then my tailwind classes don't seem to be working.loud-jewelry-99127
11/23/2023, 8:21 AMloud-jewelry-99127
11/23/2023, 5:00 PMlate-noon-56486
11/23/2023, 7:13 PMapp/assets/stylesheets/avo.tailwind.css to app/assets/stylesheets/care.tailwind.css and then setting -i ./app/assets/stylesheets/care.tailwind.css in package.json
The problem comes from how the input file and output file had the same name (avo.tailwind.css) and that manifest.js is set up to link both paths:
//= link_directory ../stylesheets .css
...
//= link_tree ../builds
I wonder if this is a bug in Avo or perhaps the docs? manifest.js was fully auto-generated by Rails+Avolate-noon-56486
11/23/2023, 7:14 PM'./app/components/**/*.{erb,haml,html,slim}' to the list of content in tailwind.config.js. I wonder if that's worth adding to the docs too...late-noon-56486
11/23/2023, 7:15 PMloud-jewelry-99127
11/23/2023, 7:24 PMloud-jewelry-99127
11/23/2023, 7:25 PMloud-jewelry-99127
11/23/2023, 7:26 PMloud-jewelry-99127
11/23/2023, 7:32 PMlate-noon-56486
11/23/2023, 7:38 PMmanifest.js, it's only ever been touched by the initial commit and this stuff with custom asset pipeline. I don't know what options/flags etc were used to set up the Rails app but I don't imagine they were anything too out of the ordinary.loud-jewelry-99127
11/24/2023, 1:06 PMmanifest.js already had the //= link_directory ../stylesheets .css line and on the process you included the //= link_tree ../builds?late-noon-56486
11/24/2023, 5:15 PMbin/rails generate avo:tailwindcss:install the manifest.js looked like:
javascript
//= link_tree ../images
//= link_directory ../stylesheets .css
//= link_tree ../../javascript .js
//= link_tree ../../../vendor/javascript .js
After running it looked like:
javascript
//= link_tree ../images
//= link_directory ../stylesheets .css
//= link_tree ../../javascript .js
//= link_tree ../../../vendor/javascript .js
//= link_tree ../buildslate-noon-56486
11/24/2023, 5:17 PM//= link_directory ../stylesheets .css or //= link_tree ../stylesheets .css in a manifest.js?loud-jewelry-99127
11/24/2023, 5:18 PMloud-jewelry-99127
11/24/2023, 5:19 PM//= link_tree ../builds manually right?loud-jewelry-99127
11/24/2023, 5:20 PMNormally if you use builds/application.js you don't also need app/assets/javascripts/application.js. i think it appyes to css too, i.e. if you link the build you dont need to also link the stylesheets directoryloud-jewelry-99127
11/24/2023, 5:24 PM//= link_directory ../stylesheets .css on the manifestlate-noon-56486
11/24/2023, 5:33 PMbash
tailwindcss\
-i ./app/assets/stylesheets/input.tailwind.css\
-o ./app/assets/builds/output.tailwind.css\
-c ./config/tailwind.config.js --minifyloud-jewelry-99127
11/24/2023, 5:40 PMor avoid the conflict by naming the files differently
This mean that both, input.tailwind.css and output.tailwind.css will end up linked on manifest file right? But since they have different names Sprockets::DoubleLinkError will not be raised.
My question is: Is correct to link both? Can this generate some conflicts or is safe?
IMHO only output.tailwind.css should be linkedloud-jewelry-99127
11/24/2023, 5:43 PMlate-noon-56486
11/24/2023, 5:50 PM//= link_tree ../builds was added by running bin/rails generate avo:tailwindcss:install. It was not added manually.late-noon-56486
11/24/2023, 5:50 PMlate-noon-56486
11/24/2023, 5:52 PM