
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
Another mini task runner based on bach
This project is no longer maintained.
This tool as been drafted for some specific needs: use it if you like, enhance it if you don't. Else gulp is a better fit for you.
npm install --save gloup
With the folder structure below:
├─ myapp
└─ tasks
  ├─ bundle.js
  ├─ clean.js
  ├─ dev.js
  ├─ dist.js
  ├─ statics.js
  └─ serve.js
myapp:
The executable main script (chmod +x myapp)
#!/usr/bin/env node
var gloup = require('gloup')
gloup(__dirname + '/tasks')
tasks/clean.js: A task must export a function that return anything async-done supports (stream, promise, etc.)
var del = require('promised-del')
var resolve = require('path').resolve
module.exports = function () {
return del(['build'], {
cwd: resolve(__dirname, '../../')
})
}
tasks/dist.js: You can compose tasks using tasks name (based on filename) or function
var series = require('gloup').series(__dirname)
var parallel = require('gloup').parallel(__dirname)
module.exports = series([
'clean',
parallel('bundle','statics'),
function () {
return new Promise(function (resolve, reject) {
// ...
})
}
])
Now, myapp can be used as a task runner
> myapp clean bundle serve
gloup ⇢ clean +0ms
gloup ⇠clean +0ms
gloup ⇢ bundle +1s
gloup ⇠bundle +6s
gloup ⇢ serve +0ms
gloup ⇠serve +2ms
Start a composed task
> myapp dist
gloup ⇢ clean +0ms
gloup ⇠clean +0ms
gloup ⇢ bundle +1s
gloup ⇢ statics +1s
gloup ⇠bundle +6s
gloup ⇠statics +6s
gloup ⇢ serve +0ms
gloup ⇠serve +2ms
With node options:
> myapp --debug --es_staging serve
Debugger listening on port 5858
gloup ⇢ serve +0ms
gloup ⇠serve +2ms
Quiet mode (remove gloup messages):
> myapp serve --quiet
Create a command line tool
#!/usr/bin/env node
var gloup = require('gloup')
// Path to the tasks folder
gloup(__dirname + '/tasks')
// Force node (iojs) flags
gloup(__dirname + '/tasks', {
flags: ['--es_staging']
})
Use series and parallel composer (just a convenient wrapper around bach) to compose tasks with name.
// gloup.series(taskFolder) -> {function} :
var series = require('gloup').series(__dirname)
// gloup.parallel(taskFolder) -> {function} :
var parallel = require('gloup').parallel(__dirname)
module.exports = series(['clean', parallel('bundle','statics')])
FAQs
Mini task runner based on bach (DEPRECATED)
We found that gloup demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.