Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@cjssdk/runner
Advanced tools
Set of methods to synchronize asynchronous operations.
npm install @cjssdk/runner
Add to the scope:
var Runner = require('@cjssdk/runner'),
runner = new Runner();
Create a simple sync task:
runner.task('lint', function () {
// some actions
});
Create a simple async task:
runner.task('build', function ( done ) {
someAsyncCall(function () {
// handle call result
done();
});
});
Create a task with serial subtasks:
runner.task('serve', runner.serial('lint', 'build'));
Create a task with parallel subtasks:
runner.task('build', runner.parallel('jade:build', 'sass:build'));
It's possible to use either anonymous or named functions as well:
runner.task('build', runner.parallel('jade:build', 'sass:build', function lessBuild ( done ) {
// function name "lessBuild" is used as task name
// otherwise <noname> is printed
done();
}));
Batch tasks creation:
Object.assign(runner.tasks,
{
taskName1: taskFunction1,
taskName2: taskFunction2
},
{
taskName3: taskFunction3,
taskName4: taskFunction4
}
);
Execute a task by name:
runner.run('lint');
Execute a task and handle the result:
runner.run('lint', function ( error ) {
if ( error ) {
console.log('the task has failed!');
}
});
Execute a task as a named or anonymous function:
runner.run(function ( done ) {
done();
});
Execute task series:
runner.run(runner.parallel('lint', 'build'));
Execute task chain:
// no result check
runner.start();
// hook on task completion
runner.start(function () {
console.log('finished');
});
// hook on task completion
runner.start(function ( error ) {
if ( error ) {
console.log('failed!');
}
});
Hook on task start/stop events:
runner.addListener('start', function ( event ) {
// {id: 'lint'}
console.log(event);
});
runner.addListener('finish', function ( event ) {
// {id: 'lint', time: 1}
console.log(event);
});
If you have any problems or suggestions please open an issue according to the contribution rules.
@cjssdk/runner
is released under the MIT License.
FAQs
Simple task runner.
We found that @cjssdk/runner 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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.