aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2019-04-17 01:22:34 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2019-04-17 01:22:34 +0200
commitae3cc9daa94ea3db3c1d9e4ddcac508d88caa11e (patch)
treea122b110e87feef9beedd03d35d0699b815ea3fb
parentc0257109c9f3113ff4fab0bccf91e32118de2fc7 (diff)
downloadrails-ae3cc9daa94ea3db3c1d9e4ddcac508d88caa11e.tar.gz
rails-ae3cc9daa94ea3db3c1d9e4ddcac508d88caa11e.tar.bz2
rails-ae3cc9daa94ea3db3c1d9e4ddcac508d88caa11e.zip
[ci skip] More asset guide touch ups
-rw-r--r--guides/source/asset_pipeline.md9
1 files changed, 5 insertions, 4 deletions
diff --git a/guides/source/asset_pipeline.md b/guides/source/asset_pipeline.md
index 2b1b8c5243..d853559440 100644
--- a/guides/source/asset_pipeline.md
+++ b/guides/source/asset_pipeline.md
@@ -33,7 +33,8 @@ passing the `--skip-sprockets` option.
rails new appname --skip-sprockets
```
-Rails automatically add the `sass-rails` gem to your `Gemfile`, which are used by Sprockets for asset compression:
+Rails automatically adds the `sass-rails` gem to your `Gemfile`, which is used
+by Sprockets for asset compression:
```ruby
gem 'sass-rails'
@@ -430,7 +431,8 @@ 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, suppose `app/assets/javascripts/application.js` file containing the following lines:
+For example, with a `app/assets/javascripts/application.js` file containing the
+following lines:
```js
// ...
@@ -1075,7 +1077,7 @@ Possible options for JavaScript compression are `:closure`, `:uglifier` and
`:yui`. These require the use of the `closure-compiler`, `uglifier` or
`yui-compressor` gems, respectively.
-For example, `uglifier` gem.
+Take the `uglifier` gem, for example.
This gem wraps [UglifyJS](https://github.com/mishoo/UglifyJS) (written for
NodeJS) in Ruby. It compresses your code by removing white space and comments,
shortening local variable names, and performing other micro-optimizations such
@@ -1222,4 +1224,3 @@ it as a preprocessor for your mime type.
```ruby
Sprockets.register_preprocessor 'text/css', AddComment
```
-