New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ember-cli-preprocess-registry

Package Overview
Dependencies
Maintainers
5
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-preprocess-registry

Preprocessor registry used internally by ember-cli.

  • 5.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
84K
decreased by-32.86%
Maintainers
5
Weekly downloads
 
Created
Source

ember-cli-preprocessor-registry

Used by Ember CLI to provide a registry of preprocessors. The main types used throughout the system are css, template, js.

Addon Usage

You can access both your own addon's and your parent's (whichever item is including you) registry via the setupPreprocessorRegistry hook in your addon's index.js.

Example:

module.exports = {
  name: 'special-js-sauce',
  
  setupPreprocessorRegistry(type, registry) {
    if (type !== 'parent') { return; }

    registry.add('js', {
      name: 'special-js-sauce-preprocessor',
      toTree() {
        // do your thing here....
      }
    });
  }
}

API

Registry.prototype.add(type: String, plugin: Plugin)

Adds the provided plugin to the registry for the type specified.

Example:

class SpecialSauce {
  get name() { return 'special-sauce'; }

  toTree(tree) {
    // return new tree after processing
  }
}

registry.add('js', new SpecialSauce);

Registry.prototype.load(type: String): Plugin[]

Returns an array of all plugins that are registered for a given type.

Registry.prototype.extensionsForType(type: String): string[]

Returns an array of all known extensions for a given type.

Registry.prototype.remove(type: String, plugin: Plugin)

Removes the provided plugin from the specified type listing.

Running Tests

npm install
npm test

FAQs

Package last updated on 11 May 2023

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