 
   pkg = grunt.file.readJSON('package.json')
 
-  # Load task dependencies
-  if pkg.devDependencies
-    for own task of pkg.devDependencies
-      grunt.loadNpmTasks(task) unless task is 'grunt'
+  require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks)
 
   # Project configuration.
   grunt.initConfig

    clean:
      options:
        force: true
      runner: [pkg.directories.build]

    coffee:
      runner:

          bare: false

        files:
          '<%= pkg.directories.build %>/<%= pkg.name %>.js': '<%= pkg.directories.build %>/<%= pkg.name %>.coffee'

      tests:
        expand: true
