Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/popomore/gulp-load
Load gulp task just like grunt.loadTasks.
https://github.com/popomore/gulp-load
Last synced: 3 months ago
JSON representation
Load gulp task just like grunt.loadTasks.
- Host: GitHub
- URL: https://github.com/popomore/gulp-load
- Owner: popomore
- Created: 2013-12-22T10:16:06.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-03-03T06:39:48.000Z (almost 11 years ago)
- Last Synced: 2024-04-14T09:24:46.486Z (9 months ago)
- Language: JavaScript
- Size: 168 KB
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gulp-load
[![Build Status](https://travis-ci.org/popomore/gulp-load.png?branch=master)](https://travis-ci.org/popomore/gulp-load)
[![Coverage Status](https://coveralls.io/repos/popomore/gulp-load/badge.png)](https://coveralls.io/r/popomore/gulp-load)Load gulp task just like grunt.loadTasks.
If you want to load plugins automatically, [gulp-load-plugins](https://github.com/jackfranklin/gulp-load-plugins) will be a good choice.
---
## Install
Install gulp-load
```
$ npm install --save gulp-load
```## Usage
Require gulp-load in your gulpfile
```
var gulp = require('gulp');
require('gulp-load')(gulp);// load tasks from tasks directory and
// dependencies of start with `gulp-` in package.json
gulp.loadTasks(__dirname);// run tasks which you loaded
gulp.tasks('default', function() {
gulp.run('your_task');
})
```## API
Gulp-load will return a function that is same as `gulp.loadTasks`.
```
var loadTasks = require('gulp-load')(gulp);
loadTasks === gulp.loadTasks // return true
```LoadTasks can load single file.
```
gulp.loadTasks('path/to/task.js');
```LoadTasks can load specified module.
```
gulp.loadTasks('path/to/module');
```LoadTasks can load by module's name. It will lookup from `NODE_PATH` and node_modules of current module.
```
gulp.loadTasks('gulp-concat');
```**If load a module, it will load task from tasks directory of current module, and if gulp plugins (start with gulp-) exists in dependencies of package.json, then it will load each plugin as a module.**
## License
MIT