egarcia
4 years ago
12
4
Mix

Problem executing mix.compass() twice.

Posted 4 years ago by egarcia

I have the code above, however task .compass only compiles assets from sass/frontend.

How can I run mix.compass twice with different sass path?

I think is the same case with this issue: https://github.com/laravel/elixir/issues/171


var assets_path = "custom/assets/",
      public_path  = "custom/public/";
elixir(function(mix) {
    mix.compass( "*", assets_path + "css/compiled/backend",
            {
                sass: assets_path + 'sass/backend',
                image: assets_path + 'img/'
            }
        )
        .styles([assets_path + "css/compiled/backend/*.css"], public_path + "css/backend.css")

        .compass( "*", assets_path + "css/compiled/frontend",
            {
                sass: assets_path + 'sass/frontend',
                image: assets_path + 'img/'
            }
        )
        .styles([assets_path + "css/compiled/frontend/*.css"], public_path + "css/frontend.css")

        .styles([assets_path + "css/*.css"], public_path + "css/all.css")

        .coffee()
        .scripts()
        .copy(assets_path + "favicons", public_path + "images/favicons")
        .version([
            'js/app.js',
            'js/all.js',
            'css/all.css',
            'css/frontend.css',
            'css/backend.css'
        ])
        .imagemin("*", public_path + "images/")

        .livereload();

});

Please sign in or create an account to participate in this conversation.