diff --git a/text/0000-embroider-v2-package-format.md b/text/0000-embroider-v2-package-format.md index b7270bc67a..f27781f2a6 100644 --- a/text/0000-embroider-v2-package-format.md +++ b/text/0000-embroider-v2-package-format.md @@ -632,6 +632,25 @@ If you don't pass any arguments, you can get the whole thing (although this make ``` +### Handlebars Macro: macroGetConfig + +The equivalent of the `getConfig` JS macro as a Handlebars helper. Given a dependency `ember-score` exposes this config: + +```json +{ + "items": [{ "score": 42 }] +} +``` + +Then: + +```hbs + +{{! ⬆️compiles to ⬇️ }} + +``` + + ### Handlebars Macro: macroCondition Used as a helper within a block `{{#if}}` or inline `{{if}}`. Just like the JS `macroCondition`, it ensures that branch elimination will happen. @@ -668,7 +687,7 @@ There is one place where `{{#if}}` doesn't work: within "element space". If you `macroMaybeAttrs` exists to conditionally compile away attributes and arguments out of element space: ```hbs -
+
``` It can be placed on both HTML elements and angle bracket component invocations. @@ -678,7 +697,7 @@ It can be placed on both HTML elements and angle bracket component invocations. Like the JS `failBuild` macro. ```hbs -{{#if (macroCondition (dependencySatisfies "some-peer-dep" "^3.0.0")) }} +{{#if (macroCondition (macroDependencySatisfies "some-peer-dep" "^3.0.0")) }} {{else}} {{macroFailBuild "You tried to use but it requires some-peer-dep ^3.0.0"}}