Skip to content

BlueCutOfficial/ember-cli-replace

 
 

Repository files navigation

ember-cli-replace

Build Status Dependency Status devDependency Status Ember Observer Score

Ember CLI addon to replace text patterns in files. This is just a thin wrapper around broccoli-replace.

Compatibility

  • Ember.js v3.12 or above
  • Ember CLI v2.13 or above
  • Node.js v10 or above

Installation

ember install ember-cli-replace

Usage

Define the source files that will be used for replacements, and patterns that will be used to replace the contents of source files.

var app = new EmberApp({
  replace: {
    files: [
      'index.html'
    ],
    patterns: [{
      match: 'foo',
      replacement: 'bar' // replaces "@@foo" to "bar"
    }],
    enabled: true // can be set to false to disable
  }
});

Options

Note: The files and patterns options are passed directly to broccoli-replace. For more information on these options, see broccoli-replace.

Files

Type: Array Default: []

Whitelist of source files to perform replacements in.

Patterns

Type: Array Default: []

List of patterns used to perform replacements in source files.

Enabled

Type: Boolean Default: true

Enable string replacement during build.

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

About

Ember CLI addon to replace text patterns in files.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 81.8%
  • HTML 17.8%
  • Handlebars 0.4%