Copying Font Awesome Fonts with Laravel Elixir

For some reason, I always have trouble setting up Font Awesome (quickly) with Laravel & Elixir.

It’s three easy steps.

Pull in font-awesome with npm or yarn

# npm
npm install font-awesome --save

# yarn
yarn add font-awesome

Import Font Awesome’s stylesheets in your app.scss file

@import "node_modules/font-awesome/scss/font-awesome.scss";

Copy Font Awesome’s font files to your public directory

Configure Elixir to do this automatically for you in your gulpfile:

elixir((mix) => {
    mix.sass('app.scss')
       .webpack('app.js')
       .copy('node_modules/font-awesome/fonts/*.*', 'public/fonts/');
});

This last step is the one that I mix up, specifically the *.* .

Hopefully this will help someone like me!