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

broccoli-bridge

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-bridge

A utility for bridging dependencies between Broccoli nodes

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

broccoli-bridge Build Status

A utility for bridging dependencies between Broccoli nodes, even if they aren't necessarily available at the time of instantiation.

Usage

Suppose you have two Broccoli plugins, A and B, that may be instantiated in any order in different areas of code, but A depends on the output of B.

const BroccoliBridge = require('broccoli-bridge');

// Stash your bridge instance somewhere central for later access
let bridge = new BroccoliBridge();

// Create your `PluginA` instance using a placeholder...
let a = new PluginA([
  inputOne,
  bridge.placeholderFor('plugin-b')
]);

// ...and then fill in that placeholder with the actual `PluginB` instance at any time before the build starts.
let b = new PluginB([inputTwo, inputThree]);
bridge.fulfill('plugin-b', b);

API

  • bridge.placeholderFor(name): returns a placeholder Broccoli node that will ultimately produce the content given by the node it's fulfilled with
  • bridge.fulfill(name, node): designates a Broccoli node to provide content for any placeholder(s) with the given name

Note that placeholderFor(name) may be called before or after name has already been fulfilled without impacting behavior.

Warning

This package relies on an internal detail of the Broccoli Plugin API, and may in principle break at any time.

FAQs

Package last updated on 24 Jul 2018

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