gruntjs/grunt — pull request #1155 by maxbeatty (2014-06-05 04:46:51+00:00)
Title: try to load main file of npm task

If a plugin doesn't follow the convention of putting their plugin file in the `tasks` directory of the module, it fails to load. This change tries to load the entry point defined in the module's [main](https://www.npmjs.org/doc/json.html#main) field.

---

I say "convention" because there's no mention of needing to use this structure in the [Creating plugins](http://gruntjs.com/creating-plugins) documentation. Happy to update that as well with or without this change.

I also didn't see an existing test for `loadNpmTasks` and wasn't sure how to add one (since it would depend on another module being present). I'd appreciate any guidance there, too!