# ember-cli-preprocess-registry

> Preprocessor registry used internally by ember-cli.

Latest version **5.0.1** (published 2023-05-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install ember-cli-preprocess-registry
pnpm add ember-cli-preprocess-registry
yarn add ember-cli-preprocess-registry
bun add ember-cli-preprocess-registry
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.0.1 |
| Published | 2023-05-11 |
| First published | 2015-06-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 16.* \|\| >= 18 |
| Dependencies | 2 |
| Unpacked size | 9.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | ember-cli Contributors |
| Maintainers | rwjblue, chadhietala, katiegengler, turbo87, stefanpenner |

## Links

- npm: https://www.npmjs.com/package/ember-cli-preprocess-registry
- Repository: https://github.com/ember-cli/ember-cli-preprocessor-registry
- Homepage: https://github.com/ember-cli/ember-cli-preprocessor-registry#readme
- Issues: https://github.com/ember-cli/ember-cli-preprocessor-registry/issues
- npm.io page: https://npm.io/package/ember-cli-preprocess-registry

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ^4.3.2
- [broccoli-funnel](https://npm.io/package/broccoli-funnel.md) ^3.0.8

## Recent versions

- 5.0.1 (latest) — 2023-05-11
- 4.0.0-beta.1 (next) — 2018-04-23
- 5.0.0 — 2023-04-05
- 3.3.0 — 2019-03-18
- 3.2.2 — 2019-02-27
- 3.2.1 — 2019-02-21
- 3.2.0 — 2019-02-08
- 3.1.2 — 2018-07-11
- 3.1.1 — 2017-02-22
- 3.1.0 — 2017-02-21
- 3.0.0 — 2016-03-04
- 2.0.0 — 2016-02-14
- 1.1.0 — 2015-11-10
- 1.0.3 — 2015-07-10
- 1.0.2 — 2015-06-30
- … 2 more at https://npm.io/package/ember-cli-preprocess-registry/versions

## README

# 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:

```js
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:

```js
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

```bash
npm install
npm test
```

---
_Source: https://npm.io/package/ember-cli-preprocess-registry · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
