From 0c8206b85e2a9e43089945fa4d7624acef436ec2 Mon Sep 17 00:00:00 2001 From: rmacklin <1863540+rmacklin@users.noreply.github.com> Date: Mon, 23 Mar 2020 17:36:42 -0700 Subject: [PATCH] Fix confusing wording in Asset Pipeline guide [ci skip] (#38782) * Clean up leftover plural "gems" references as a follow-up to ab123a33d2460dcdc5c36001cef5316eadc75fb3 * Remove mention of generating CoffeeScript files in Preprocessing section * Clarify what sass-rails is used for * Link to the sass-rails repo and sass-lang.com * Remove mention of the deprecated `sass` gem to reflect the change from https://github.com/rails/sass-rails/commit/409d871c2a971691eac86c5a32e614e2941c72b8 --- guides/source/asset_pipeline.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/guides/source/asset_pipeline.md b/guides/source/asset_pipeline.md index ae2dffa8a4..97bc10fa50 100644 --- a/guides/source/asset_pipeline.md +++ b/guides/source/asset_pipeline.md @@ -33,16 +33,17 @@ passing the `--skip-sprockets` option. $ rails new appname --skip-sprockets ``` -Rails automatically adds the `sass-rails` gem to your `Gemfile`, which is used -by Sprockets for asset compression: +Rails automatically adds the [`sass-rails`](https://github.com/rails/sass-rails) +gem to your `Gemfile`, which is used by Sprockets for +[Sass](https://sass-lang.com) compilation: ```ruby gem 'sass-rails' ``` Using the `--skip-sprockets` option will prevent Rails from adding -them to your `Gemfile`, so if you later want to enable -the asset pipeline you will have to add those gems to your `Gemfile`. Also, +this gem, so if you later want to enable the asset pipeline +you will have to add it to your `Gemfile` manually. Also, creating an application with the `--skip-sprockets` option will generate a slightly different `config/application.rb` file, with a require statement for the sprockets railtie that is commented-out. You will have to remove @@ -509,17 +510,16 @@ might concatenate three CSS files together this way: ### Preprocessing The file extensions used on an asset determine what preprocessing is applied. -When a controller or a scaffold is generated with the default Rails gemset, a -CoffeeScript file and a SCSS file are generated in place of a regular JavaScript -and CSS file. The example used before was a controller called "projects", which -generated an `app/assets/stylesheets/projects.scss` file. +When a controller or a scaffold is generated with the default Rails gemset, an +SCSS file is generated in place of a regular CSS file. The example used before +was a controller called "projects", which generated an +`app/assets/stylesheets/projects.scss` file. -In development mode, or if the asset pipeline is disabled, when these files are -requested they are processed by the processors provided by the `coffee-script` -and `sass` gems and then sent back to the browser as JavaScript and CSS -respectively. When asset pipelining is enabled, these files are preprocessed and -placed in the `public/assets` directory for serving by either the Rails app or -web server. +In development mode, or if the asset pipeline is disabled, when this file is +requested it is processed by the processor provided by the `sass-rails` gem and +then sent back to the browser as CSS. When asset pipelining is enabled, this +file is preprocessed and placed in the `public/assets` directory for serving by +either the Rails app or web server. Additional layers of preprocessing can be requested by adding other extensions, where each extension is processed in a right-to-left manner. These should be