Use Matchdep module to load installed Grunt plugins #4

Open
wants to merge 1 commit into from

2 participants

@kadamwhite

Calling loadNpmTasks for each Grunt plugin installed is duplicative, so Tyler Kellen created a matchdep package to allow Grunt to piggyback on the list of Grunt plugins saved in package.json. Using this module reduces boilerplate and makes it more obvious the package.json is the canonical list of installed plugins. Tyler's a Grunt team member and Ben's endorsed the syntax, so it's an officially-sanctioned approach.

@aaronjorbin alerted me to this syntax, and it's been a huge help wherever I use Grunt. My devil's advocate response to this PR would be concern about adding yet another external module dependency vs using the more-verbose-but-honestly-what-are-ten-lines-among-friends Grunt-native syntax, but I think the clarity could be helpful.

@kadamwhite kadamwhite Use Matchdep module to load installed Grunt plugins
Calling `loadNpmTasks` for each Grunt plugin installed is duplicative, so
Tyler Kellen created a matchdep package to allow Grunt to piggyback on
the list of Grunt plugins saved in package.json. Using this module reduces
boilerplate and makes it more obvious the package.json is the canonical
list of installed plugins. Tyler's a Grunt team member and Ben's endorsed
the syntax, so it's an officially-sanctioned approach.
e4a5f20
@aaronjorbin

I'm definitely a fan of matchdep since it does make the grunt file cleaner and more focused on the tasks at hand (pun intended). 👍

@aaronjorbin

@kadamwhite I moved this ticket over to core trac since the develop repo is now live. http://core.trac.wordpress.org/ticket/24980

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment