def yarn(lib) run("yarn add #{lib}") end yarn "@fortawesome/fontawesome-free" inject_into_file 'app/javascript/packs/application.js' do <<~EOF import '@fortawesome/fontawesome-free/js/all' import '@fortawesome/fontawesome-free/css/all.css' EOF end