Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

get-grunt-tasks

3.1.0 • Public • Published

get-grunt-tasks Build Status

Get the grunt tasks from a grunt project

Install

$ npm install --save get-grunt-tasks

Usage

Imagine a gruntfile.js in ./grunt-project:

module.exports = grunt => {
    grunt.registerTask('default');
    grunt.registerTask('test');
};

You can get its tasks with:

const getGruntTasks = require('get-grunt-tasks');
 
getGruntTasks('grunt-project').then(tasks => {
    console.log(tasks);
    //=> ['default', 'test']
});

API

getGruntTasks([path])

Returns a promise.

path

Type: string
Default: process.cwd()

Path to the directory of your grunt project.

License

MIT © Sindre Sorhus

install

npm i get-grunt-tasks

Downloadsweekly downloads

1

version

3.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar