【问题标题】:Laravel Elixir watch not working properlyLaravel Elixir 手表无法正常工作
【发布时间】:2016-09-30 08:33:55
【问题描述】:

所以当我创建一个新的 Laravel 项目时,gulp watch 工作得非常完美。现在我正在研究也使用 Laravel 的 PyroCMS 项目,而 gulp watch 有点失败。我不知道为什么。 同时看多个sass文件好像有问题。它根本不看。但是,使用一个 sass 文件,它可以完美运行。 这是我的代码:

var sassPath    = './addons/dscms/anomaly/generali-theme/resources/sass/',
    cssPath     = './addons/dscms/anomaly/generali-theme/resources/css/',
    jsPath      =   './addons/dscms/anomaly/generali-theme/resources/js/',
    jsCopyPath      =   './addons/dscms/anomaly/generali-theme/resources/js/my-js/';

elixir(mix => {
mix
.sass([
    ''+sassPath+'main-style.sass',
    ''+sassPath+'section1.sass',
    ''+sassPath+'section2.sass'
    ], ''+cssPath+'main.css')
.scripts([
    ''+jsPath+'main.js',
    ''+jsPath+'main-2.js',
    ''+jsPath+'main-3.js'
],''+jsCopyPath+'main.js');
});

它也适用于多个 js 文件,但不适用于 sass 文件。请帮我解决这个问题。非常感谢!

【问题讨论】:

    标签: php laravel gulp-watch pyrocms laravel-elixir


    【解决方案1】:

    对此我很抱歉。那完全是我的错 :) 那里的语法有点错误。正确的代码是这样的

    mix
    .sass(''+sassPath+'*.*', ''+cssPath+'main.css')
    

    我测试了它。它监视多个文件并连接到一个文件中。完美运行!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-06-19
      • 2013-06-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-03-03
      相关资源
      最近更新 更多