{"id":22250148,"url":"https://github.com/fluffywaffles/gulp-load-subtasks","last_synced_at":"2025-07-28T05:31:44.932Z","repository":{"id":47920104,"uuid":"43784811","full_name":"fluffywaffles/gulp-load-subtasks","owner":"fluffywaffles","description":"A globular gulp subtask loader","archived":false,"fork":false,"pushed_at":"2022-12-30T19:25:16.000Z","size":561,"stargazers_count":11,"open_issues_count":9,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-04T14:51:10.682Z","etag":null,"topics":["gulp","subtask"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fluffywaffles.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-06T23:29:14.000Z","updated_at":"2021-01-11T18:14:49.000Z","dependencies_parsed_at":"2023-01-31T14:31:27.421Z","dependency_job_id":null,"html_url":"https://github.com/fluffywaffles/gulp-load-subtasks","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/fluffywaffles/gulp-load-subtasks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluffywaffles%2Fgulp-load-subtasks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluffywaffles%2Fgulp-load-subtasks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluffywaffles%2Fgulp-load-subtasks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluffywaffles%2Fgulp-load-subtasks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fluffywaffles","download_url":"https://codeload.github.com/fluffywaffles/gulp-load-subtasks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluffywaffles%2Fgulp-load-subtasks/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267468111,"owners_count":24092271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gulp","subtask"],"created_at":"2024-12-03T06:43:06.049Z","updated_at":"2025-07-28T05:31:44.699Z","avatar_url":"https://github.com/fluffywaffles.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hullo from Gulp Load Subtasks!\n[![Build Status](https://travis-ci.org/fluffywaffles/gulp-load-subtasks.svg?branch=master)](https://travis-ci.org/fluffywaffles/gulp-load-subtasks)\n\n### What is this and why?\n\nDo you have a long gulpfile?\n\nDo you wish you could split it up into modules?\n\nModules, like, grouped task files; like, test.tasks.js and build.tasks.js.\n\nWouldn't that be nice?\n\nIf you'd like that, you're in luck! _That's_ what Gulp Load Subtasks does!\n\n:tada: **Easy, not-so-ugly, auto-loaded subtasks!** :tada:\n\n### How to install:\n```js\nnpm i --save-dev gulp-load-subtasks\n```\n\n### Alternatives and Comparison:\n* [gulp-hub](https://github.com/frankwallis/gulp-hub)\n  * Multiple gulpfiles, not multiple modules\n  * No globbing (?)\n  * No coffee/livescript support (?)\n  * Lets you have multiples of the same task and will run them all together\n  * **Intention**: run Gulp tasks from multiple projects at once\n* [require-dir](https://github.com/aseemk/requireDir)\n  * No globbing\n  * Requires the directory's modules into an object\n  * No coffee/livescript support  (?)\n  * **Intention**: ability to require a directory into any Node environment\n* **gulp-load-subtasks** (You are here!)\n  * Supports globbing\n  * Opinionated\n  * Fully supports coffee/livescript tasks, gulpfiles\n  * Works with and is heavily inspired by\n    [gulp-load-plugins](https://github.com/jackfranklin/gulp-load-plugins)\n  * **Intention**: ability to import sets of related tasks into any Gulp\n    environment\n\n### Basics\n\nIn its simplest form, gulp-load-subtasks can be passed some directory ('dir', relative to cwd) and it will find all files matching 'dir/\\*\\*/\\*.tasks.js' and load those tasks. Here's that example in code:\n\n```js\nrequire('gulp-load-subtasks')('dir')\n```\n\nYou can pass optional additional arguments that will be passed on to all subtask functions,\nsuch as a plugin object from gulp-load-plugins.\n\nYou can also access `loadSubtasks` from your gulp-load-plugins object!\n\nExample using gulp-load-plugins:\n\n```js\nvar gulp = require('gulp')\n  , $    = require('gulp-load-plugins')()\n\n// pass the plugins along so that your tasks can use them\n$.loadSubtasks('dir', $)\n```\n\nYou can also use gulp-load-subtasks with CoffeeScript and LiveScript!\n\nJust change your require statement to\n\n```coffee\n# in gulpfile.coffee\n(require 'gulp-load-subtasks/coffee')('dir')\n```\n\n```ls\n# in gulpfile.ls\n(require 'gulp-load-subtasks/livescript')('dir')\n```\n\nand it will load `dir/**/*.tasks.coffee` or `dir/**/*.tasks.ls` by default\ninstead.\n\n#### Basic Example (with directory structure)\n\n_Directory structure:_\n\n```\n+ gulpfile.js\n|\n+ tasks/\n  + a.tasks.js\n  + b.tasks.js\n```\n\n_tasks/a.tasks.js:_\n\n```js\nmodule.exports = function (gulp) {\n  gulp.task('subtaskA1', function () {\n    // do things... A1\n  })\n  gulp.task('subtaskA2', function () {\n    // do things... A2\n  })\n}\n```\n\n_tasks/b.tasks.js_\n\n```js\nmodule.exports = function (gulp, $) {\n  gulp.task('subtaskB', function () {\n    // do things... B\n    // use plugins!\n    gulp.src('*.sass')\n      .pipe($.sass())\n      .pipe(gulp.dest('sassy-css-goes-here'))\n  })\n}\n```\n\n_gulpfile.js:_\n\n```js\nvar gulp = require('gulp')\n  , $    = require('gulp-load-plugins')()\n\n$.loadSubtasks('tasks')\n// OR path can be a glob\n$.loadSubtasks('tasks/**/*.js')\n// Pass in your plugins\n$.loadSubtasks('tasks', $)\n// Actually pass whatever you want, gulp can chug it /badpun\n$.loadSubtasks('tasks', $, \"hi mom\", { a: \"b\" }, ...)\n\n// You can now refer to the tasks defined in a.tasks.js and b.tasks.js!\ngulp.task('default', [ 'subtaskA1', 'subtaskB' ])\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluffywaffles%2Fgulp-load-subtasks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluffywaffles%2Fgulp-load-subtasks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluffywaffles%2Fgulp-load-subtasks/lists"}