Intern Track Roadmap

Folder structure: app/assets

This course looks at the app/assets/ folder in a Rails project that uses Propshaft, Tailwind and import maps. It starts from the layout lines that load CSS and JavaScript and follows each one to its files. It covers the Tailwind source file and its @theme design tokens, the build that writes app/assets/builds/tailwind.css, and how Propshaft fingerprints images with a content hash. It also draws the boundary between app/assets/ and app/javascript/, then runs the build and inspects Propshaft's load paths.

What you'll learn

  • ✓What each folder under app/assets/ holds and why
  • ✓How @theme tokens in application.css become Tailwind utilities
  • ✓How tailwindcss:build and tailwindcss:watch generate builds/tailwind.css
  • ✓How Propshaft fingerprints files so browsers avoid stale cached copies
  • ✓Where app/assets/ ends and app/javascript/ begins, and what import maps do
  • ✓How to inspect the build output and Propshaft's load paths
Free preview · Lesson 1 2 min read

What app/assets/ holds in this project

This project's layout, app/views/layouts/application.html.erb, has these three lines in its <head>:

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...