You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If your `gulpfile.js` is starting to grow too large, you can split
4
-
the tasks into separate files using one of the methods below.
5
-
6
-
> Be advised, that this approach is [considered deprecated][deprecated]
7
-
> and could lead to problems when migrating to the `gulp 4`.
8
-
9
-
10
-
## Using `gulp-require-tasks`
11
-
12
-
You can use the [gulp-require-tasks][gulp-require-tasks]
13
-
module to automatically load all your tasks from the individual files.
14
-
15
-
Please see the [module's README][gulp-require-tasks] for up-to-date instructions.
16
-
17
-
## Using `require-dir`
18
-
19
-
You can also use the [require-dir][require-dir] module to load your tasks manually.
3
+
If your `gulpfile.js` is starting to grow too large, you can split the tasks
4
+
into separate files by using the [gulp-hub](https://github.com/frankwallis/gulp-hub/tree/4.0)
5
+
module as a [custom registry](https://github.com/phated/undertaker#registryregistryinstance).
20
6
21
7
Imagine the following file structure:
22
8
@@ -28,20 +14,25 @@ tasks/
28
14
└── test.js
29
15
```
30
16
31
-
Install the `require-dir` module:
17
+
Install the `gulp-hub` module:
32
18
33
19
```sh
34
-
npm install --save-dev require-dir
20
+
npm install --save-dev gulp-hub
35
21
```
36
22
37
23
Add the following lines to your `gulpfile.js` file:
This recipe can also be found at https://github.com/frankwallis/gulp-hub/tree/4.0/examples/recipe
0 commit comments