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

should accept inline Object Literals as Task Groups #92

Closed
shakyShane opened this issue Sep 1, 2016 · 0 comments
Closed

should accept inline Object Literals as Task Groups #92

shakyShane opened this issue Sep 1, 2016 · 0 comments

Comments

@shakyShane
Copy link
Contributor

if an object literal with a tasks property is given within a parent tasks array, like

cb.task('build', [
    '@sh rm -rf dist',
    '@npm webpack --config webpack-prod.js',
    {
        tasks: ['rsync', 'open']
    }
]);

this is exactly equivalent to the following:

cb.task('build', [
    '@sh rm -rf dist',
    '@npm webpack --config webpack-prod.js',
    'rsync', 
    'open'
]);

but, by providing an Object literal for the last two tasks, you could use additional features, like running in parallel, environment vars, only running following file changes etc etc

eg:

cb.task('build', [
    '@sh rm -rf dist',
    '@npm webpack --config webpack-prod.js',
    {
        tasks: ['rsync', 'open'],
        ifChanged: ['path/to/src'],
        runMode: 'parallel',
        env: {
            REMOTE: 'http://example.com'
        }
    }
]);
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