Workiva / wGulp

Opinionated Suite of Gulp Tasks for JavaScript and TypeScript projects.
Apache License 2.0
12 stars 9 forks source link

CP-397 Add excludeFromAll feature #130

Closed maxwellpeterson-wf closed 9 years ago

maxwellpeterson-wf commented 9 years ago

Problem

It is cumbersome to prevent some task from running. Currently you would have to figure out which tasks depend on it, and explicitly exclude it from each, like so:

Trying to remove the libraryDist task

taskTree: {
    dist: {
        exclude: ['libraryDist']
    },
    "minify:css": {
        exclude: ['libraryDist']
    },
    "minify:js": {
        exclude: ['libraryDist']
    },
}

Solution

Support a special-case taskTree option to exclude a task from all. Reduces the above case to this:

taskTree: {
    excludeFromAll: ['libraryDist']
}

Note that includes take precedence. So this will still work:

taskTree: {
    excludeFromAll: ['libraryDist'],
    fullDist: {
        include: ['libraryDist']
    }
}

Fixes #113

Testing instructions

install this version of wGulp add excludeFromAll to the task tree and make sure that task are being properly excluded

@trentgrover-wf @evanweible-wf

rmconsole-wf commented 9 years ago
    When this pull is merged I will use the following information:
    Version: wGulp 0.7.9
    Release Ticket: CP-456

Last updated on Monday, March 09 11:07 AM CST

trentgrover-wf commented 9 years ago

+1

evanweible-wf commented 9 years ago

+1

maxwellpeterson-wf commented 9 years ago

@jayudey-wf ready for merge

jayudey-wf commented 9 years ago

QA Resource Approval: +10

Merging into master.