npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

get-grunt-tasks

4.0.1

@sindresorhus

npmHomeRepoSnykSocket
Downloads:350
$ npm install get-grunt-tasks
DailyWeeklyMonthlyYearly

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.