# broccoli-config-replace

> Simple templating using a config.json and regex patterns

Latest version **1.1.3** (published 2026-02-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install broccoli-config-replace
pnpm add broccoli-config-replace
yarn add broccoli-config-replace
bun add broccoli-config-replace
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: no vulnerabilities; has provenance.

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

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2026-02-23 |
| First published | 2015-10-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1 |
| Author | yaymukund |
| Maintainers | real_ate, rwjblue, katiegengler, stefanpenner |
| Keywords | broccoli, broccoli-plugin, config, ember-cli, javascript, template, js |

## Links

- npm: https://www.npmjs.com/package/broccoli-config-replace
- Repository: https://github.com/ember-cli/broccoli-config-replace
- Homepage: https://github.com/ember-cli/broccoli-config-replace#readme
- Issues: https://github.com/ember-cli/broccoli-config-replace/issues
- npm.io page: https://npm.io/package/broccoli-config-replace

## Dependencies (3)

- [debug](https://npm.io/package/debug.md) ^2.2.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^0.24.0
- [broccoli-plugin](https://npm.io/package/broccoli-plugin.md) ^1.2.0

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.1.3 (latest) — 2026-02-23
- 1.1.2 — 2016-03-26
- 1.1.1 — 2015-12-21
- 1.1.0 — 2015-10-29
- 1.0.0 — 2015-10-25

## README

# broccoli-config-replace [![Build Status](https://travis-ci.org/ember-cli/broccoli-config-replace.svg)](https://travis-ci.org/ember-cli/broccoli-config-replace)

Simple templating using a config.json and regex patterns.

```js
new ConfigReplace(appNode, configNode, {
  // annotate the output. See broccoli-plugin
  annotations: true,

  // A list of files to parse:
  files: [
    'index.html',
    'tests/index.html'
  ],

  configPath: 'development.json',
  outputPath: 'dist/',
  patterns: [{
    match: /\{\{EMBER_ENV\}\}/g,
    replacement: function(config) { return config.EMBER_ENV; }
  }, {
    match: /\{\{APPLICATION_NAME\}\}/g,
    replacement: 'My Application'
  }]
});
```

If `replacement` is a function, it's passed the config object. Otherwise,
do a simple string replacement.

## Running tests

`npm test`

---
_Source: https://npm.io/package/broccoli-config-replace · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
