Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

undertaker

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

undertaker

Task registry that allows composition through series/parallel methods.

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.3M
decreased by-2.65%
Maintainers
1
Weekly downloads
 
Created

What is undertaker?

The undertaker npm package is a customizable task runner built on top of the Orchestrator library. It allows developers to define, execute, and manage tasks in a highly flexible manner. It's particularly useful for setting up build pipelines, automating repetitive tasks, and integrating with other tools and libraries in a development workflow.

What are undertaker's main functionalities?

Defining and executing tasks

This feature allows developers to define tasks using the `task` method and execute them in sequence or parallel using the `series` and `parallel` methods. The code sample demonstrates how to define a 'clean' task and a 'build' task that runs after the 'clean' task.

const { task, series } = require('undertaker');

task('clean', function(cb) {
  // Task to clean the build directory
  console.log('Cleaning build directory...');
  cb();
});

task('build', series('clean', function(cb) {
  // Task to build the project
  console.log('Building the project...');
  cb();
}));

Custom task registries

Undertaker supports custom task registries, allowing developers to define their own storage and retrieval mechanisms for tasks. This feature is useful for creating reusable task collections or integrating with other systems. The code sample shows how to create a custom registry and define a 'build' task within it.

const { Registry } = require('undertaker');
const defaultRegistry = new Registry();

defaultRegistry.set('build', function(cb) {
  // Custom build task
  console.log('Custom build task running...');
  cb();
});

const { task } = require('undertaker')(defaultRegistry);

task('build');

Other packages similar to undertaker

Keywords

FAQs

Package last updated on 26 Feb 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc