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
Only put gulp tasks in your `taskDirectory`. All `.js` files in this directory will be attempted to be read as gulp tasks. Nested directories are supported as of `v1.0.29`.
56
76
57
-
### Delimiters
77
+
<h3id="options-delimiters">Delimiters</h3>
58
78
59
79
The purpose of the delimiters is to allow flexibility in task naming. A common convention for task names is to delimit using the `:` character, however `:`'s are not generally used or allowed in file names. A common usage of the delimiters is as follows:
60
80
@@ -67,9 +87,9 @@ taskLoader({
67
87
68
88
These options would convert a filename such as `move-all.js` to a task with the name `move:all`.
You can use [gulp-load-plugins](https://www.npmjs.com/package/gulp-load-plugins) to easily lazy-load your gulp plugins. Use gulp-load-plugins in conjunction with gulp-simple-task-loader to minimize your gulpfile.
75
95
@@ -82,7 +102,7 @@ var plugins = require('gulp-load-plugins')();
82
102
taskLoader({ plugins: plugins });
83
103
```
84
104
85
-
##### Passing in plugins manually
105
+
<h4id="options-plugins-passing-in-plugins-manually">Passing in plugins manually</h4>
86
106
87
107
If not using gulp-load-plugins you must specify which plugins you want made available to your tasks.
88
108
@@ -98,13 +118,13 @@ var plugins = {
98
118
taskLoader({ plugins: plugins });
99
119
```
100
120
101
-
## Structuring a task
121
+
<h2id="structuring-a-task">Structuring a task</h2>
102
122
103
123
All tasks should be functions that receive the parameters `gulp`, `config`, and `plugins`.
104
124
105
125
There are 2 ways to structure a task -- returning a function that executes the task, or returning an object that contains dependencies, parameters, and the function that executes the task.
<h3id="structuring-a-task-tasks-with-dependencies-and-or-parameters">Tasks with dependencies and/or parameters</h3>
120
140
121
141
All 3 object keys (`deps`, `params`, and `fn`) are optional. This allows you to create a task that strictly calls other tasks, a task that is parameterized, or a task that just acts like a normal task.
122
142
@@ -144,9 +164,9 @@ fn: function(param, cb) {} // where param is an item from the params array,
144
164
// and cb is a callback to be called at the end of your function
The task in `parameterized.js` would produce the following output:
239
-
```bash
259
+
```sh
240
260
1
241
261
2
242
-
```
262
+
```
263
+
264
+
<h2id="changelog">Changelog</h2>
265
+
266
+
Documented below are any significant changes to the package.
267
+
268
+
* 1.x.x
269
+
* 1.2.x
270
+
*[1.2.1](https://github.com/reaganthomas/gulp-simple-task-loader/commit/767318e136aa7cb27925e73587487d11486ed50f) - added testing for `plugins` and `config` options
271
+
*[1.2.0](https://github.com/reaganthomas/gulp-simple-task-loader/commit/768cc7e19488193a2171602a50e17c21f1cf9067) - restructured package to be more modular
272
+
* 1.1.x
273
+
*[1.1.6](https://github.com/reaganthomas/gulp-simple-task-loader/commit/0a042343adc2ee449e5a9e27dbc8fa01add9034b) - added documentation for testing the package
274
+
*[1.1.4](https://github.com/reaganthomas/gulp-simple-task-loader/commit/3af56bd8353834d49a59f50ad49065be768e1e44) - improved documentation for parameterized tasks
*[1.0.35](https://github.com/reaganthomas/gulp-simple-task-loader/commit/d78e36f06957b78e093a763ca3c3bef35559b3d2) - added support for coffeescript - [@chafnan](https://github.com/chafnan)
*[1.0.29](https://github.com/reaganthomas/gulp-simple-task-loader/commit/e0b9bf3e2a000c78955a96c61c14b73999ac615c) - added functionality to allow for recursive directory task searching
280
+
*[1.0.17](https://github.com/reaganthomas/gulp-simple-task-loader/commit/e3d28d22ae085b2fd83ca914bfb3341962ab5f27) - added documentation for calling the plugin; added documentation for complete examples
281
+
*[1.0.16](https://github.com/reaganthomas/gulp-simple-task-loader/commit/5ddc6f5b5735538169d1123df5299e2e1cb0f794) - created README.md
282
+
*[1.0.15](https://github.com/reaganthomas/gulp-simple-task-loader/commit/0833009aefb217673891387916642c5ed1a53be9) - added dependency support for tasks
283
+
*[1.0.14](https://github.com/reaganthomas/gulp-simple-task-loader/commit/e178e6ca2dfb5e571ea622cb56d5915ad7954e48) - implemented first set of tests
0 commit comments