aws-amplify / aws-amplify/docs
Move code examples to separate repo
- Dominant language
- MDX
- Stars
- 506
- Forks
- 1.1k
- Avg merge
- 3h 14m
- Merged PRs (30d)
- 1
Description
**Is your feature request related to a problem? Please describe.**
The current code examples require a lot of copy and paste. There code blocks exists in the doc site as static strings. This has some drawbacks:
1. Users can not reset the work space to the last working state easily, when the user error is introduced at an unknow step during the exercise.
2. The example code is not tested. There isn't a mechanism to prevent future PRs breaking the code example.
**Describe the solution you'd like**
The code example can be separated into a different repo(example repo). The repo maintains Git references to each step of each example. In the exercises, users need to clone the example repo, and checkout the commit of a given step of the exercise. This brings some advantages:
1. The examples can be valid projects instead of markdown contents. We can implement automated test on them.
2. No creating the project layout manually, or copy-pasting content needed, if users want to skip.
3. Ease to reset the workplace to any given step in clean slate.
Drawbacks:
More work to maintain the commits and example repo's CI.
**Describe alternatives you've considered**
N/A
**Additional context**
N/A
Contributor guide
Assessment
This issue has not been assessed yet.