# load-grunt-tasks [](https://travis-ci.org/sindresorhus/load-grunt-tasks) > Load multiple grunt tasks using globbing patterns ---
🔥 Want to strengthen your core JavaScript skills and master ES6?
I would personally recommend this awesome ES6 course by Wes Bos.
## Usage
```js
// Gruntfile.js
module.exports = grunt => {
// Load all grunt tasks matching the ['grunt-*', '@*/grunt-*'] patterns
require('load-grunt-tasks')(grunt);
grunt.initConfig({});
grunt.registerTask('default', []);
};
```
## Examples
### Load all grunt tasks
```js
require('load-grunt-tasks')(grunt);
```
Equivalent to:
```js
require('load-grunt-tasks')(grunt, {pattern: ['grunt-*', '@*/grunt-*']});
```
### Load all grunt-contrib tasks
```js
require('load-grunt-tasks')(grunt, {pattern: 'grunt-contrib-*'});
```
### Load all grunt-contrib tasks and another non-contrib task
```js
require('load-grunt-tasks')(grunt, {pattern: ['grunt-contrib-*', 'grunt-shell']});
```
### Load all grunt-contrib tasks excluding one
You can exclude tasks using the negate `!` globbing pattern:
```js
require('load-grunt-tasks')(grunt, {pattern: ['grunt-contrib-*', '!grunt-contrib-coffee']});
```
### Set custom path to package.json
```js
require('load-grunt-tasks')(grunt, {config: '../package'});
```
### Only load from `devDependencies`
```js
require('load-grunt-tasks')(grunt, {scope: 'devDependencies'});
```
### Only load from `devDependencies` and `dependencies`
```js
require('load-grunt-tasks')(grunt, {scope: ['devDependencies', 'dependencies']});
```
### All options in use
```js
require('load-grunt-tasks')(grunt, {
pattern: 'grunt-contrib-*',
config: '../package.json',
scope: 'devDependencies',
requireResolution: true
});
```
## Options
### pattern
Type: `string`, `Array`