Huge News!Announcing our $40M Series B led by Abstract Ventures.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
Maintainers
5
Created

What is ember-cli-preprocess-registry?

The ember-cli-preprocess-registry package provides a registry for managing preprocessors in Ember CLI. It allows you to register and manage preprocessors for various types of files, such as JavaScript, CSS, and templates, enabling custom transformations and optimizations during the build process.

What are ember-cli-preprocess-registry's main functionalities?

Registering a preprocessor

This feature allows you to register a custom preprocessor for JavaScript files. The `add` method takes the type of file ('js' in this case), an object with the preprocessor's name, file extension, and a `toTree` function that defines the transformation logic.

const PreprocessRegistry = require('ember-cli-preprocess-registry');

let registry = new PreprocessRegistry();

registry.add('js', {
  name: 'my-js-preprocessor',
  ext: 'js',
  toTree(tree) {
    // Custom transformation logic
    return tree;
  }
});

Using a preprocessor

This feature demonstrates how to use a registered preprocessor. After registering a CSS preprocessor, you can load it using the `load` method, which applies the preprocessor's transformation logic to the provided tree.

const PreprocessRegistry = require('ember-cli-preprocess-registry');

let registry = new PreprocessRegistry();

registry.add('css', {
  name: 'my-css-preprocessor',
  ext: 'css',
  toTree(tree) {
    // Custom transformation logic
    return tree;
  }
});

let cssTree = registry.load('css', someCssTree);

Other packages similar to ember-cli-preprocess-registry

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