npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ember-cli-config-builder

v0.1.9

Published

Edit Ember app configs in your addon blueprints!

Readme

ember-cli-config-builder

Build Status npm version

Extensible library to edit Ember’s config files with familiar API.

Why? Checkout this blog post.

Installation

  • $ npm install --save ember-cli-config-builder

Or

  • $ yarn add ember-cli-config-builder

Basic Usage

// Import library
const ConfigBuilder = require('ember-cli-config-builder');

// Create builder instance. Notice: it is async operation which returns
// Promise because async fs.readFile method is used to read file contents
let config = await ConfigBuilder.create('./my-addon/config/environment.js');

// Read variables with #get(path) method. Notice: it is always returns string
// with raw value. Example: "'string value'", 'true', '{ object: true }' etc
config.get('rootURL'); // "'/'"

// Read nested values with dot-separated path
config.get('EmberENV.EXTEND_PROTOTYPES.Date'); // 'false'

// Read multiple values at once
config.get(['modulePrefix', 'locationType']); // { modulePrefix: "'dummy'", locationType: "'auto'" }

// Change existing properties with #set(path, value) method. It returns true
// if set was successful or false otherwise
config.set('rootURL', "'/dev'"); // true

// Create a new poperty
config.set('myNewProp', '{}'); // true

// Change nested properties
config.set('EmberENV.EXTEND_PROTOTYPES.Date', 'true'); // true

// Change or create multiple properties at once
config.setProperties({ 'myNewProp.child': "'works'", 'rootURL.child': "'rootURL is not an object'" }); // { 'myNewProp.child': true, 'rootURL.child': false }

// Or remove properties entirely with #remove(path) method. It returns true
// if key was found and removed and false otherwise
config.remove('rootURL'); // true

// You can remove only child keys.
config.remove('myNewProp.child'); // true

// Multiple remove is available as well
config.removeProperties(['myNewProp', 'modulePrefix']); // { myNewProp: true, modulePrefix: true }

// After editing is done there are a few options to save result.
// The most straightforward is save to the same file.
// Notice: this method is async as well because of usage non-blocking
// fs.writeFile method
await config.save(); // will write changes to disk and return string with file content

// Or you can write changes to another file
await config.save('./my-addon/config/new-environment.js');

// See Advanced Usage section for more use cases

Built-in adapters

  • environment.js
  • ember-cli-build.js

Alternatives

  • ember-cli-build-config-editor – uses the same approach with recast AST trees but is have many limits what you can edit and uses it owns non-Ember intuitive API. Also it moves reading and writing files to user responsibilities.
  • recast – very powerful but yet very low-level tool to parse, edit and print JavaScript files. This addon wraps it to make editing much more easier.

Advanced Usage

TODO: write this :)

Contributing

Installation

git clone [email protected]:kolybasov/ember-cli-config-builder.git

cd ember-cli-config-builder

yarn install

Running tests

yarn test – Runs jest tests

License

This project is licensed under the MIT License.