laravel 5如何使用node_modules中的模板编译elixir

时间:2016-06-20 12:55:08

标签: laravel-5 gulp laravel-elixir

我在我的应用程序上安装了https://github.com/puikinsh/gentelella,有没有办法将资产链接到laravel elixir?

这是我的模板目录

Root
|-app/
|-node_module/
|   |-gentelella/ # -> this is my template
|-gulpfile.js
|-public/
// other laravel folders to follow.

内部./gulpfile.js

var elixir = require('laravel-elixir');

/*
 |--------------------------------------------------------------------------
 | Elixir Asset Management
 |--------------------------------------------------------------------------
 |
 | Elixir provides a clean, fluent API for defining some basic Gulp tasks
 | for your Laravel application. By default, we are compiling the Sass
 | file for our application, as well as publishing vendor resources.
 |
 */

elixir(function(mix) {
    mix.sass('app.scss');
});

1 个答案:

答案 0 :(得分:1)

试试这个:

elixir(function(mix) {
    mix.sass('app.scss');

    mix.styles([
        'node_modules/path/to/gentelella/css.css'
    ], 'public/css/app.css', './');

    mix.version('public/css/app.css');
});