mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Asset pipeline: Remove documentation about outdated config.assets.compress
option
[ci skip]
This commit is contained in:
parent
e8e9b6f25e
commit
d4530c9c90
2 changed files with 7 additions and 14 deletions
|
@ -435,11 +435,11 @@ Sprockets uses manifest files to determine which assets to include and serve.
|
|||
These manifest files contain _directives_ - instructions that tell Sprockets
|
||||
which files to require in order to build a single CSS or JavaScript file. With
|
||||
these directives, Sprockets loads the files specified, processes them if
|
||||
necessary, concatenates them into one single file and then compresses them (if
|
||||
`Rails.application.config.assets.compress` is true). By serving one file rather
|
||||
than many, the load time of pages can be greatly reduced because the browser
|
||||
makes fewer requests. Compression also reduces file size, enabling the
|
||||
browser to download them faster.
|
||||
necessary, concatenates them into one single file and then compresses them
|
||||
(based on value of `Rails.application.config.assets.js_compressor`). By serving
|
||||
one file rather than many, the load time of pages can be greatly reduced because
|
||||
the browser makes fewer requests. Compression also reduces file size, enabling
|
||||
the browser to download them faster.
|
||||
|
||||
|
||||
For example, a new Rails application includes a default
|
||||
|
@ -1105,11 +1105,6 @@ NOTE: You will need an [ExecJS](https://github.com/rails/execjs#readme)
|
|||
supported runtime in order to use `uglifier`. If you are using Mac OS X or
|
||||
Windows you have a JavaScript runtime installed in your operating system.
|
||||
|
||||
NOTE: The `config.assets.compress` initialization option is no longer used in
|
||||
Rails to enable either CSS or JavaScript compression. Setting it will have no
|
||||
effect on the application. Instead, setting `config.assets.css_compressor` and
|
||||
`config.assets.js_compressor` will control compression of CSS and JavaScript
|
||||
assets.
|
||||
|
||||
### Using Your Own Compressor
|
||||
|
||||
|
@ -1290,8 +1285,8 @@ config.assets.digest = true
|
|||
|
||||
Rails 4 and above no longer set default config values for Sprockets in `test.rb`, so
|
||||
`test.rb` now requires Sprockets configuration. The old defaults in the test
|
||||
environment are: `config.assets.compile = true`, `config.assets.compress = false`,
|
||||
`config.assets.debug = false` and `config.assets.digest = false`.
|
||||
environment are: `config.assets.compile = true`, `config.assets.debug = false` and
|
||||
`config.assets.digest = false`.
|
||||
|
||||
The following should also be added to your `Gemfile`:
|
||||
|
||||
|
|
|
@ -157,8 +157,6 @@ pipeline is enabled. It is set to true by default.
|
|||
|
||||
* `config.assets.raise_runtime_errors` Set this flag to `true` to enable additional runtime error checking. Recommended in `config/environments/development.rb` to minimize unexpected behavior when deploying to `production`.
|
||||
|
||||
* `config.assets.compress` a flag that enables the compression of compiled assets. It is explicitly set to true in `config/environments/production.rb`.
|
||||
|
||||
* `config.assets.css_compressor` defines the CSS compressor to use. It is set by default by `sass-rails`. The unique alternative value at the moment is `:yui`, which uses the `yui-compressor` gem.
|
||||
|
||||
* `config.assets.js_compressor` defines the JavaScript compressor to use. Possible values are `:closure`, `:uglifier` and `:yui` which require the use of the `closure-compiler`, `uglifier` or `yui-compressor` gems respectively.
|
||||
|
|
Loading…
Reference in a new issue