Enable passing Interpolation Variables into Deployer
- Dominant language
- TypeScript
- Stars
- 48
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
For other apps that use Solution.js, there will be a need to provide a hash of interpolation variables into the Deployer function, allowing the newly created items to share "context" with existing items.
For example - within a Hub Site, we will use Solution.js to deploy "recommended solutions". Within those Solution Templates, we will have variable interpolations that expect `{{site.url}}` or `{{site.name}}` etc. We expect the same sort of thing will happen with Urban and other apps that want to create tightly integrated outputs.
Put simply, the consumer of Solution.js should be able to pass a hash of values, which get's extended into the `replacements` hash that is passed into `replaceInTemplate`
```
export function replaceInTemplate(template: any, replacements: any): any {
return adlib.adlib(template, replacements, TRANSFORMS);
}
```
We would not expect the Home App to provide this application-specific context.
Needed: Input about how best to implement this in Solution.js without moving too much 🧀
Contributor guide
Assessment
This issue has not been assessed yet.