get-grunt-tasks

4.0.1 • Public • Published

get-grunt-tasks

Get the Grunt tasks from a Grunt project

Install

npm install 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:

import getGruntTasks from 'get-grunt-tasks';

console.log(await getGruntTasks('grunt-project'));
//=> ['default', 'test']

API

getGruntTasks(cwd?)

Returns a Promise<string[]> with the tasks.

cwd

Type: string
Default: process.cwd()

The path to the directory of your Grunt project.

/get-grunt-tasks/

    Package Sidebar

    Install

    npm i get-grunt-tasks

    Weekly Downloads

    0

    Version

    4.0.1

    License

    MIT

    Unpacked Size

    2.91 kB

    Total Files

    4

    Last publish

    Collaborators

    • sindresorhus