nathanmac / laravel-elixir-imagemin

Laravel Elixir wrapper for ImageMin
MIT License
52 stars 14 forks source link

Ability to add more than a directory of origin and destination #15

Open sergiohermes opened 8 years ago

sergiohermes commented 8 years ago

First, congratulations on the module it is very interesting.

I believe this would be an improvement ...

For example, normally systems have different directories eg:

and their images would be there.


//as we have today
config.images = _.extend({
        folder: 'images', //It would be interesting to place an object containing several directories recursively
        outputFolder: 'images'
}, config.images || {});

elixir.json

//possible implementation
{
    "images": {
            "frontend-test1": {
                "folder": ["frontend/images/folder1", "frontend/images/folder2"], // find by resources
                "outputFolder": "images/frontend/folder1", "images/frontend/folder2" //export into public/
            },
            "frontend-test2": {
                "folder": ["frontend/images/folder3", "frontend/images/folder4"], // find by resources
                "outputFolder": "images/frontend/folderx" //export into public/             
            }

            "backend-test1": {
                "folder": ["backend/images/folder1", "backend/images/folder2"], // find by resources
                "outputFolder": "images/backend/folderx" //export into public/              
            }

            "backend-test2": {
                "folder": ["backend/images/folder3", "backend/images/folder4"], // find by resources
                "outputFolder": "images/backend/foldery" //export into public/              
            }

    }
}

Today, I have only one option to put the images.

It would be interesting and I believe that increase the functionality of it, with the possibility of adding different directories of both origin and destination.

Sincerely, and success!

CupOfTea696 commented 8 years ago

Can this please be added?