-
Notifications
You must be signed in to change notification settings - Fork 0
Adding a new task
Ashley Gibson edited this page Jan 30, 2026
·
2 revisions
Adding a new task requires two changes:
- Creating your new task file.
- Updating
gulpfile.jsto export your task file.
Add a new JavaScript file in the tasks folder. The name of the file should match the new task name as closely as possible. For example: tasks/mynewtask.js
Here's an example file:
// define your task
const myNewTask = (done) => {
// perform your task here
// make sure you have a return statement
return Promise.resolve()
}
// if necessary, customize the display name
myNewTask.displayName = 'task:new' // necessary if you want colons or hyphens in the actual task command
// export
export {
myNewTask
}Update the gulpfile.js to add your task file to the list of task exports at the bottom:
/************** Task Exports */
export * from './tasks/build.js'
export * from './tasks/bump.js'
+ export * from './tasks/mynewtask.js'