Laravel Elixir - Compiling and concatenating bootstrap files with a custom file name

193 Views Asked by At

Trying to concatenate the bootstrap folder into a single .scss file but its not working.

It either puts them into a file called "all.scss" or if I try to specify the output name:

mix.styles([
    'bootstrap/*.scss'
], 'resources/assets/sass/bootstrap.scss', 'resources/assets/sass/');

It created a directory called 'bootstrap.scss' and then puts an all.scss file into that.

How can I concatenate all the files in the bootstrap folder into a single scss file with my name of choice?

1

There are 1 best solutions below

0
On

Presumably because your mixing css files, if you want to do scss files (or sass) you need to do:

mix.sass([
 'bootstrap/*.scss'
], 'resources/assets/sass/'name of choice'.scss');

Also, it might be worth mentioning, you probably want to put the output file in public folder. So something like this:

'public/vendor/`name of choice`.scss'