handsome
handsome

Reputation: 2392

Elixir only compiles to app.css

I'm using Laravel5 elixir to generate css files from my .scss files

this is my gulpfile.js

var elixir = require('laravel-elixir');
elixir.config.sourcemaps = false;

elixir(function(mix) {
    mix
        .sass(['homepage.scss'])
});

for some reason the output is always app.css instead of homepage.css any ideas? I updated elixir to "laravel-elixir": "^3.0.0"

what i'm missing?

Upvotes: 0

Views: 174

Answers (1)

Sergio Guillen Mantilla
Sergio Guillen Mantilla

Reputation: 1468

reading documentation I saw that for "styles" we can have three arguments, one is an array that specifies the style files, second argument is the output file name and third argument is a resulting directory.

Reading sass task source code we see that first argument is an array of files and the second argument is the output file.

Adding a second argument to your code we have:

var elixir = require('laravel-elixir');
elixir.config.sourcemaps = false;

elixir(function(mix) {
    mix
        .sass(['homepage.scss'], 'homepage.css')
});

Upvotes: 1

Related Questions