Skip to content

Commit

Permalink
Remove mention of generating CoffeeScript files in Preprocessing section
Browse files Browse the repository at this point in the history
of the Asset Pipeline guide

This section previously declared that the Rails controller generator
generated an `app/assets/javascripts/projects.coffee` and an
`app/assets/stylesheets/projects.scss` file. Then, in
ab123a3, we removed the assertion that
`app/assets/javascripts/projects.coffee` would be generated (to reflect
the switch to webpacker for managing javascript in Rails 6). However,
the preceding sentence and the subsequent paragraph were still written
with the assumption that a CoffeeScript file would be generated.

Now we've reworded those parts to be consistent with the fact that Rails
no longer generates a CoffeeScript file.

[ci skip]
  • Loading branch information
rmacklin committed Mar 23, 2020
1 parent fd9a032 commit e71692f
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions guides/source/asset_pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -510,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.

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.
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 this file is
requested it is processed by the processor provided by the `sass` 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
Expand Down

0 comments on commit e71692f

Please sign in to comment.