This is a monorepo used as a template for creating Ember addons using Embroider in the V2 format. It consists of two packages - the Basic Addon itself, and an Ember App for testing, debugging, documenting, and showcasing the addon.
Category | Status |
---|---|
Conventions | |
Code Stats | |
Security | |
Development | |
Issues & PRs | |
Release Status | |
Publish Status |
The Embroider build system gets default configurations for addons from two different places:
- The options from the "main" / "build" file specified in the addon's Ember Package Metadata
- The config() function from the same "main" / "build" file
At App build time,these addon configurations are processed as:
- The options object - merged with the @embroider/macros key specified in the "ember-cli-build.js" file of the app
- The config() return value - merged with the config/environment.js file of the app
The merged configs are accessible / usable in diffferent places:
- The merged options object is available in the @embroider/macros artifacts - getConfig, getOwnConfig, etc.
- The merged config() return value is available in the "contentFor" hooks
This monorepo provides an extremely trivial implementation of an addon / test-app pair that reads / uses a common configuration file called dual-build-config.js.
Ember-related goals:
- Build for Ember 4.0+ - with no expectation of backward compatibility
- Build using Embroider - aim for "Native Support"
Addon goals::Showcase how to effectively integrate with / consume the Embroider build system artifacts:
- Use the contentFor hooks to conditionally inject HTML at build time - based on config defined in {{app}}/config/environment.js
- Use the @embroider/macros capabilities to conditionally include/exclude artifacts - based on config defined in {{app}}/ember-cli-build.js
Developer Experience Goals::Provide a monorepo to be used as a template / jump-off point:
- Should be trivial to clone / install / build / run and see how the classical / embroider build systems interact
- Should be trivial to remove the artifacts exported by the example addon and add new ones
- Should be trivial to use the new artifacts in the example app
All contributors to this project are expected to adhere to the Code of Conduct specified.
Details on getting the code, setting up the development environment, and instructions on how to extend/build/test the code are detailed in the Contribution Guide
This project owes its existence to these wonderful people (emoji key):
Vish Desai |
This project follows the all-contributors specification. Contributions of any kind are welcome!
This project is licensed under the MIT +no-false-attribs license. You may get a copy of the license by following the link, or at LICENSE.md