# Blueprint that modifies environment config?

**URL:** <https://discuss.emberjs.com/t/blueprint-that-modifies-environment-config/8017>\
**Category:** Ember CLI\
**Created:** [May 16, 2015, 4:48am UTC](https://discuss.emberjs.com/t/blueprint-that-modifies-environment-config/8017 "2015-05-16T04:48:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marlorn](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/marlorn/32/10868_2.png) [@marlorn](https://discuss.emberjs.com/u/marlorn)\
**Post date:** [May 16, 2015, 4:48am UTC](https://discuss.emberjs.com/t/blueprint-that-modifies-environment-config/8017/1 "2015-05-16T04:48:16Z")

</div>

I’m relatively new to Ember and was wondering if there is a way to create a blueprint/generator that would inject a new value into the environment config. Is there some Ember magic that allows an existing file to act as the blueprint template? My ideal implementation would look something like this:

`ember g platform foo`

```nohighlight
// config/environment.js
module.exports = function(environment) {
var ENV = {
  // Existing config values here...
  APP: {
    platforms: {
      foo: 'abc123' // Generator injects the 'foo' platform and a GUID
    }
  };
  // Existing environment-specific settings here...
  return ENV;
};

```

I realize this is probably more of a Node question (using `fs.readFile()` and `fs.writeFile()`), but any ideas are appreciated – thanks!

---

<div class="post-metadata">

**Author:** ![ZebraFlesh](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/zebraflesh/32/10762_2.png) [@ZebraFlesh](https://discuss.emberjs.com/u/ZebraFlesh)\
**Post date:** [May 17, 2015, 3:45pm UTC](https://discuss.emberjs.com/t/blueprint-that-modifies-environment-config/8017/2 "2015-05-17T15:45:05Z")

</div>

I think you’re confusing things. The blueprint will generate code which is then included in an application (for example, a fancy button). The addon will install the blueprint and perform any necessary modifications to the environment (for example, adding a bower dependency or including some CSS so the fancy button will work correctly). Check out the [ember-cli docs](http://www.ember-cli.com/#developing-addons-and-blueprints) for a discussion of what hooks are available for add ons. There are several that will do the trick, but it’s difficult to tell which one is for you without further information. The config hook (which it looks like is not documented; read some addon code to see how it actually works) might be what you want.
