Skip to content

empress/empress-blueprint-helpers

Repository files navigation

empress-blueprint-helpers

This is a small utility that is designed to help implement Empress default blueprints that are designed to update host-application configs on first install.

Basic Usage

This example is taken from the Field Guide default blueprint. If you would like to see the example in action you can view it in the source code

Here is a simplified example of how to use this utility:

const { applyConfig } = require('empress-blueprint-helpers');

module.exports = {
  description: 'Default blueprint for Field Guide',

  afterInstall() {
    applyConfig(this.project, 'field-guide', {
      name: 'Product Name',
      copyright: 'This is the default copyright string - update before publishing',
      github: 'https://github.com/empress/field-guide?update-with-your-repo-url'
    })
  }
};

This afterInstall() will be run after the first installation of the addon that it is installed in. The above code sample will add the specified JSON object into the ./config/environment.js file for the host Ember application automatically under the key field-guide.

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.