Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

broccoli-config-replace

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-config-replace

Simple templating using a config.json and regex patterns

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
122K
decreased by-2.92%
Maintainers
3
Weekly downloads
 
Created
Source

broccoli-config-replace Build Status

Simple templating using a config.json and regex patterns.

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

Keywords

FAQs

Package last updated on 26 Mar 2016

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