The role of Rails Asset Pipeline is to compress a bunch of CSS files into a CSS, compressing a bunch of JS into a JS, reducing the HTTP request when accessing the page. where are the css/js stored? (Lego parts)
In rails, the style file is saved in the following two file directories:
App/assets
Applied style files, such as articles, users, comments Css/js
Lib/assets
External source style files, such as Videojs,jquery plugin manifest files (drawings)
In the assets directory, there is a class of declaration files (manifest), typically application.css or application.js.
The point of their existence is to tell the app: What CSS files I have included.
successful compilation (Lego robot)
In a production environment, rails places the compressed files in the public/assets. Only one JS only one CSS removed spaces, comments, line breaks, etc. create a gzip version of the style file
When the user initiates the request, it can be thrown directly to the user after compressing the file.