Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/evanshortiss/gulp-task-loader
Load gulp tasks like a boss.
https://github.com/evanshortiss/gulp-task-loader
Last synced: 21 days ago
JSON representation
Load gulp tasks like a boss.
- Host: GitHub
- URL: https://github.com/evanshortiss/gulp-task-loader
- Owner: evanshortiss
- Created: 2015-05-11T17:30:50.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-05-11T17:37:30.000Z (over 9 years ago)
- Last Synced: 2024-04-09T13:09:28.248Z (7 months ago)
- Language: JavaScript
- Size: 117 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
gulp-task-loader
================Auto generate tasks for your gulpfile the modular way, like a boss.
This module will allow you to define your gulp tasks in separate files/folders
and automatically load them into gulp for use in your gulpfile. It supports a
subtask Grunt-like syntax too which is nice when you want to define child tasks
under a single parent name e.g _ng-annotate:add_ and _ng-annotate:remove_.## Example
You have the following project structure:
```
|---gulpfile.js
|---/www
|---/gulp
|-----minify.js
|-----concat.js
|-----/ng-anotate
|-----add.js
|-----remove.js
```Your gulpfile can look like this:
```javascript
var gulp = require('gulp')
, gtl = require('gulp-task-loader');gtl.loadTasks({
gulp: gulp,
dir: path.join(__dirname, './gulp')
});// We can use any task defined in the ./gulp folder
gulp.task('bundle', [
'ng-annotate:add',
'concat',
'minify',
'ng-annotate:remove' // Tidy up our source files by removing annotations
]);
```All the tasks have been intelligently loaded for you!
# API
Just a single function is exported by this library.### loadTasks(opts)
Load tasks into gulp for the provided options object. Options can include the
following keys:* gulp - Required. The gulp instance to bind tasks to.
* dir - Required. Where we should load tasks from.
* logLevel - Used to enable logging for debugging. Supports 'info', 'error' etc.