Skip to content

Instantly share code, notes, and snippets.

@cwparsons
Last active July 10, 2018 23:53
Show Gist options
  • Save cwparsons/8a88db844f8e46f7c133e75b9c656685 to your computer and use it in GitHub Desktop.
Save cwparsons/8a88db844f8e46f7c133e75b9c656685 to your computer and use it in GitHub Desktop.
Allow other developers to create their own gulp tasks.

We use the following to allow developers to have their own specific gulp tasks.

try {
require('./gulpfile.user.js')(gulp);
} catch (e) {
console.log('No user gulpfile to import.');
}
/* Normal gulpfile here. */
module.exports = function (gulp) {
gulp.task('__Custom task', () => {
/* Specific user-based task or workflow here. */
});
};
/* Example file. */
module.exports = function (gulp) {
gulp.task('__Custom task', () => {
/* Specific user-based task or workflow here. */
});
};
{
"devDependencies": {
"gulp": "3.9.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment