🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

undertaker-registry

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
u

undertaker-registry

Default registry in gulp 4.

2.0.0
latest
100

Supply Chain Security

100

Vulnerability

97

Quality

78

Maintenance

100

License

Version published
Weekly downloads
1.3M
-22.73%
Maintainers
2
Weekly downloads
 
Created
Issues
0

What is undertaker-registry?

The undertaker-registry npm package is used to manage and organize tasks in Gulp, a popular JavaScript task runner. It allows developers to register, retrieve, and manage tasks in a modular way, making it easier to maintain and scale build processes.

What are undertaker-registry's main functionalities?

Registering Tasks

This feature allows you to register tasks using a custom registry. The code sample demonstrates how to create a custom registry by extending the Registry class and registering a 'default' task.

const { Registry } = require('undertaker-registry');
const { task } = require('gulp');

class MyRegistry extends Registry {
  init(taker) {
    taker.task('default', function(cb) {
      console.log('default task');
      cb();
    });
  }
}

task.registry(new MyRegistry());
task('default')();

Retrieving Tasks

This feature allows you to retrieve tasks that have been registered. The code sample shows how to retrieve and execute a 'build' task from a custom registry.

const { Registry } = require('undertaker-registry');
const { task } = require('gulp');

class MyRegistry extends Registry {
  init(taker) {
    taker.task('build', function(cb) {
      console.log('build task');
      cb();
    });
  }
}

task.registry(new MyRegistry());
const buildTask = task('build');
buildTask();

Modular Task Management

This feature allows you to manage tasks in a modular way, making it easier to maintain and scale your build processes. The code sample demonstrates how to register and execute multiple tasks ('clean' and 'build') using a custom registry.

const { Registry } = require('undertaker-registry');
const { task } = require('gulp');

class MyRegistry extends Registry {
  init(taker) {
    taker.task('clean', function(cb) {
      console.log('clean task');
      cb();
    });
    taker.task('build', function(cb) {
      console.log('build task');
      cb();
    });
  }
}

task.registry(new MyRegistry());
task('clean')();
task('build')();

Other packages similar to undertaker-registry

FAQs

Package last updated on 29 Dec 2021

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