Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common actions #115

Open
martendegroot opened this issue Jan 18, 2017 · 0 comments
Open

Common actions #115

martendegroot opened this issue Jan 18, 2017 · 0 comments

Comments

@martendegroot
Copy link

Is it possible to keep a common actionlist, and only change the options per config?
Example:

So instead of:

aws_s3: {
    options: {
        region: 'eu-west-1'
    },
    dev: {
        options: {
            bucket: 'dev.domain.com'
        },
        files: [
            {src: 'index.html', dest: 'index.html', action: 'copy'}
        ]
    },
    prod: {
        options: {
            bucket: 'www.domain.com'
        },
        files: [
            {src: 'index.html', dest: 'index.html', action: 'copy'}
        ]
    }
}

Being able to write something like:

aws_s3: {
    options: {
        region: 'eu-west-1'
    },
    files: [
        {src: 'index.html', dest: 'index.html', action: 'copy'}
    ],
    dev: {
        options: {
            bucket: 'dev.domain.com'
        }
    },
    prod: {
        options: {
            bucket: 'www.domain.com'
        }
    }
}

In my actual code that would save me a great deal of duplicate code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant