get-gulp-tasks

5.0.0 • Public • Published

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.

/get-gulp-tasks/

    Package Sidebar

    Install

    npm i get-gulp-tasks

    Weekly Downloads

    8

    Version

    5.0.0

    License

    MIT

    Unpacked Size

    2.8 kB

    Total Files

    4

    Last publish

    Collaborators

    • sindresorhus