get-gulp-tasks
v5.0.0
Published
Get the gulp tasks from a gulp project
Downloads
9
Maintainers
Readme
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.