get-gulp-tasks

Get the gulp tasks from a gulp project


Keywords
gulpfriendly, gulp, gulpfile, tasks, get, project
License
MIT
Install
npm install get-gulp-tasks@1.0.0

Documentation

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.