Last active
October 12, 2017 07:37
-
-
Save dieunb/4e1e4e68459342f2934553d32f80d84d to your computer and use it in GitHub Desktop.
rails5 + bootstrap3, font-awesome with Yarn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Font-awesome | |
| vi node_modules/font-awesome/scss/_variables.scss | |
| # Replace | |
| $fa-font-path: "../fonts"; | |
| # with this code | |
| $fa-font-path: "font-awesome/fonts"; | |
| # Bootstrap | |
| vi node_modules/gentelella/vendors/bootstrap/dist/css/bootstrap.css | |
| # Replace this | |
| @font-face { | |
| font-family: 'Glyphicons Halflings'; | |
| src: url('../fonts/glyphicons-halflings-regular.eot'); | |
| src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regula$ | |
| } | |
| # with | |
| @font-face { | |
| font-family: 'Glyphicons Halflings'; | |
| src: url('bootstrap/fonts/glyphicons-halflings-regular.eot'); | |
| src: url('bootstrap/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('bootstrap/fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('bootstrap/fonts/glyphicons-halflings-regular.woff') format('woff'), url('bootstrap/fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('bootstrap/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); | |
| } | |
| # Compile again with disable yarn install task runtime | |
| cd bin/ | |
| mv yarn _yarn | |
| cd .. | |
| RAILS_ENV=production rails assets:precompile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment