5.0.0 • Published 4 years ago
get-gulp-tasks v5.0.0
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-tasksUsage
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.