Simplify SmartEdit setup
@Xymmer is already working on this.
Since Sep 2, 2020.
- Dominant language
- HTML
- Stars
- 11
- Forks
- 22
- Avg merge
- 7d 3h
- Merged PRs (30d)
- 2
Description
Is your feature request related to a problem? Please describe.
https://sap.github.io/spartacus-docs/smartEdit-setup-instructions-for-spartacus/
The current guide warrants an unnecessary change to angular.json and also isn't very clear on data-smartedit-allow-origin
Describe the solution you'd like
-
You can streamline it by copying the
webApplicationInjectortosrc/assets, since the whole folder is configured as asset already.cp .../hybris/bin/modules/smartedit/smarteditaddon/acceleratoraddon/web/webroot/_ui/shared/common/js/webApplicationInjector.js src/assets -
Explain that
data-smartedit-allow-origin:- allows for multiple whitelist entries, separated by
, - supports patterns (
*matches a component of a hostname)
Here is an example configuration that works for local development and the standard endpoints of a ccv2 subscription at the same time:
<script id="smartedit-injector" src="assets/webApplicationInjector.js" data-smartedit-allow-origin="localhost:9002,*.*.model-t.cc.commerce.ondemand.com:443"></script> - allows for multiple whitelist entries, separated by
Describe alternatives you've considered
Additional context
It's just a minor improvement, but let's make it as easy as possible for everyone.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.