0

我正在使用 Laravel5 elixir 从我的 .scss 文件生成 css 文件

这是我的 gulpfile.js

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

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

出于某种原因,输出始终是 app.css 而不是 homepage.css 有什么想法吗?我将 elixir 更新为 "laravel-elixir": "^3.0.0"

我错过了什么?

4

1 回答 1

1

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')
});
于 2015-08-04T04:55:27.890 回答