Rails has these generators that we can use to customize every new app that we create based on our requirements.
Suppose, we want to create a new Rails app with Postgresql DB instead of the default sqlite3, then we can use the --database
alias.
Similarly, we could also use these generator options to remove something we don’t want.
For example, if we want to write our tests using RSpec
and do not want the unnecessary test
directory from getting created.
We could use the -T
or --skip-test
aliases.
In Rails 6, the option webpacker got replaced with --javascript
to allow apps to with import-map
, es-build
, or webpacker
.
Rails will now allow --js
as a new alias along with -j
and --javascript
to customize apps with javascript.
So, if we need to create apps with esbuild
, webpacker
, or rollup
as our javascript choice, we should be able to use the new alias.
We should also be able to use --skip-js
alias instead of --skip-javascript
to skip any javascript option altogether.
It is a minor enhancement, but it makes a lot more sense as we tend to associate JavaScript with js
alias more than j
intuitively.
Note: The enhancement is yet to be released in the official Rails version