Skip to content

Commit 955041b

Browse files
committed
[ci skip] replace Uglifier example with Terser
Ref: rails#42589
1 parent 0d8f657 commit 955041b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

guides/source/asset_pipeline.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,20 +1068,20 @@ Possible options for JavaScript compression are `:terser`, `:closure`, `:uglifie
10681068
`:yui`. These require the use of the `terser`, `closure-compiler`, `uglifier` or
10691069
`yui-compressor` gems, respectively.
10701070

1071-
Take the `uglifier` gem, for example.
1072-
This gem wraps [UglifyJS](https://github.com/mishoo/UglifyJS) (written for
1071+
Take the `terser` gem, for example.
1072+
This gem wraps [Terser](https://github.com/terser/terser) (written for
10731073
NodeJS) in Ruby. It compresses your code by removing white space and comments,
10741074
shortening local variable names, and performing other micro-optimizations such
10751075
as changing `if` and `else` statements to ternary operators where possible.
10761076

1077-
The following line invokes `uglifier` for JavaScript compression.
1077+
The following line invokes `terser` for JavaScript compression.
10781078

10791079
```ruby
1080-
config.assets.js_compressor = :uglifier
1080+
config.assets.js_compressor = :terser
10811081
```
10821082

10831083
NOTE: You will need an [ExecJS](https://github.com/rails/execjs#readme)
1084-
supported runtime in order to use `uglifier`. If you are using macOS or
1084+
supported runtime in order to use `terser`. If you are using macOS or
10851085
Windows you have a JavaScript runtime installed in your operating system.
10861086

10871087
### GZipping your assets

guides/source/configuring.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ pipeline is enabled. It is set to `true` by default.
172172

173173
* `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.
174174

175-
* `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.
175+
* `config.assets.js_compressor` defines the JavaScript compressor to use. Possible values are `:terser`, `:closure`, `:uglifier` and `:yui` which require the use of the `terser`, `closure-compiler`, `uglifier` or `yui-compressor` gems respectively.
176176

177177
* `config.assets.gzip` a flag that enables the creation of gzipped version of compiled assets, along with non-gzipped assets. Set to `true` by default.
178178

0 commit comments

Comments
 (0)