Episodes

Resources

Download Source Code

Summary

# Terminal
rails new template --javascript esbuild --css sass

yarn add mvp.css
yarn add @fortawesome/fontawesome-free

mkdir -p app/assets/fonts
cp -R node_modules/@fortawesome/fontawesome-free/webfonts app/assets/fonts

rails assets:clobber assets:precompile
RAILS_ENV=production RAILS_SERVE_STATIC_FILES=true rails server

# app/assets/stylesheets/application.sass.scss
@use 'mvp.css/mvp.css';
//$fa-font-path: 'webfonts';
$fa-font-path: 'fafonts';
// @use '@fortawesome/fontawesome-free/css/all.css';
@import '@fortawesome/fontawesome-free/scss/fontawesome';
@import '@fortawesome/fontawesome-free/scss/brands';
@import '@fortawesome/fontawesome-free/scss/solid';
@import '@fortawesome/fontawesome-free/scss/regular';
@import '@fortawesome/fontawesome-free/scss/v4-shims';

# app/assets/config/manifest.js
//= link_tree ../images
//= link_tree ../builds
//= link_tree ../fonts