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

Made by Antonio Ramirez

get-gulp-tasks

5.0.0

@sindresorhus

npmHomeRepoSnykSocket
Downloads:15
$ npm install get-gulp-tasks
DailyWeeklyMonthlyYearly

get-gulp-tasks

Get the Gulp tasks from a Gulp project

It spawns the local gulp binary in the specified directory and fetches the Gulp tasks.

Install

npm install get-gulp-tasks

Usage

Imagine a gulpfile.js in ./gulp-project:

export const foo = () => {};
export const bar = () => {};

You can get its tasks with:

import getGulpTasks from 'get-gulp-tasks';

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

API

getGulpTasks(cwd?)

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

cwd

Type: string
Default: process.cwd()

The path to the directory of your Gulp project.