Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/empress/empress-blueprint-helpers
https://github.com/empress/empress-blueprint-helpers
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/empress/empress-blueprint-helpers
- Owner: empress
- License: mit
- Created: 2019-12-03T14:58:30.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T18:55:44.000Z (about 2 years ago)
- Last Synced: 2024-10-31T01:51:24.282Z (2 months ago)
- Language: JavaScript
- Size: 455 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
empress-blueprint-helpers
==============================================================================This is a small utility that is designed to help implement [Empress](https://github.com/empress) default blueprints that are designed to update host-application configs on first install.
Basic Usage
------------------------------------------------------------------------------This example is taken from the [Field Guide](https://github.com/empress/field-guide) default blueprint. If you would like to see the example in action you can [view it in the source code](https://github.com/empress/field-guide/blob/e82222eab1e1be4d7ab1552bd185cdc080f2a39b/blueprints/field-guide/index.js#L42)
Here is a simplified example of how to use this utility:
```javascript
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](CONTRIBUTING.md) guide for details.
License
------------------------------------------------------------------------------This project is licensed under the [MIT License](LICENSE.md).