Laravel Elixir包括Paths for less

时间:2015-02-25 15:02:40

标签: php less laravel-5 laravel-elixir

我正在尝试使用Laravel Elixir,我希望在Elixir saass中使用includePaths包含bootstrap less文件

var paths = {
    'bootstrap': './vendor/bower_components/bootstrap-sass-official/assets/'
}

elixir(function(mix) {
    mix.sass("style.scss", 'public/assets/css/', {includePaths: [paths.bootstrap + 'stylesheets/']})
});

是否有更少类似的东西?

1 个答案:

答案 0 :(得分:2)

根据https://laracasts.com/discuss/channels/general-discussion/bower-bootstrap-less-and-elixir

elixir(function(mix) {
    mix.less('application.less', 'public/css', {
        paths: __dirname + '/vendor/bower_components/bootstrap/less'
    });
});