Closed MtnBiker closed 1 year ago
rails new Xyz --css=bootstrap
leads to an application with:
• JS Bundling Rails
• CSS Bundling Rails
• A foreman (./bin/dev) file that looks like this:
web: bin/rails server -p 3000
js: yarn build --watch
css: yarn build:css --watch
• A package.json file that builds the file app/assets/stylesheets/application.bootstrap.scss
into the file app/assets/builds/application.css
"build:css": "sass ./app/assets/stylesheets/application.bootstrap.scss:./app/assets/builds/application.css --no-source-map --load-path=node_modules"
I understand this better now. Some of the confusion is a bootstrap install installs esbuild.
Another question: Why isn't the file just named app/assets/stylesheets/application.scss
to be consistent with the same content. Some people seem to have the application.scss
import a file bootstrap.scss
which has the two imports which separates things, but for two lines not sure it's needed.
The "or" is confusing. If you install Bootstrap, you have
application.bootstrap.scss
. Is it processed twice?