How do I customize the javascript and stylesheet output destinations, file names, and contents?
I would like to change the output destination as follows.
app/assets/javascripts/items.js
↓
app/javascript/packs/items/[index show new edit].js
app/assets/stylesheets/moves.css
↓
app/javascript/app-style/items/[index show new edit].sass
Changing the contents of a file is simple.
rails app:templates:copy
(rake rails:templates:copy for Rails 5 and earlier)
This will copy the template file to lib/templates, so please edit it.
It is a little difficult to rewrite the output destination.You must customize the behavior of the generator.There's a mechanism in place, but it's a little hard to explain the steps from scratch, so see Rails guide.
There are two possible policies.
353 I have saved several codes written in python to a visual studio file.
345 Who developed the "avformat-59.dll" that comes with FFmpeg?
356 Unity Virtual Stick Does Not Return to Center When You Release Your Finger
371 Update Flask User Information
340 Memory layouts learned in theory don't work out as expected when actually printed as addresses.
© 2023 OneMinuteCode. All rights reserved.