https://github.com/kisphp/gulp-commander
gulp tasks service container
https://github.com/kisphp/gulp-commander
Last synced: 7 months ago
JSON representation
gulp tasks service container
- Host: GitHub
- URL: https://github.com/kisphp/gulp-commander
- Owner: kisphp
- License: mit
- Created: 2017-04-30T20:56:08.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-11T20:26:32.000Z (almost 9 years ago)
- Last Synced: 2025-08-23T10:28:38.675Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/kisphp/gulp-commander)
# Kisphp Gulp Commander
Tool to allow modularization of gulp tasks
## Installation
```bash
npm install --save kisphp-gulp-commander
```
## Usage
Create `gulpfile.js` file with the following content:
```javascript
let gulp = require('gulp');
let requireDir = require('require-dir');
let GR = require('kisphp-gulp-commander');
// load tasks
requireDir('./gulp-tasks', { recurse: true });
// run tasks (all chain)
gulp.task('default', GR.getTasks());
// run watch task
gulp.task('watch', GR.getWatch());
// list all registered tasks
gulp.task('list', () => {
GR.displayList();
});
```
Create `./gulp-tasks/scss.js` file and add css related gulp tasks. At the end of the file add:
```javascript
// here you define scss tasks
let GR = require('kisphp-gulp-commander');
GR.addTask('scss'); // here you register the main scss task
GR.addWatch('watch:scss'); // here you register the watch task
```
> Do the same for other tasks like: `javascript`, `copy-files`, etc
If you have multiple tasks you can provide them as an array
```javascript
GR.addTask([
'scss:external',
'scss:local'
]);
GR.addWatch([
'watch:scss:local',
'watch:scss:admin'
]);
```
Now execute `gulp` command and it will run all registered commands