codewars-handbook icon indicating copy to clipboard operation
codewars-handbook copied to clipboard

Auto-generate a new section for project documentation

Open ParanoidUser opened this issue 5 years ago • 0 comments

Create a new Gradle build task that would extend an existing project README.md document with a new collapsable section "View Solution" (collapsed by default). The section should contain the code-formatted content from the source file(s) related to the project.

Example:

Giving the sub-project A + B located in /kata/8-kyu/a-plus-b with the corresponding README.md and the source file FirstClass.java. Supposing that the new Gradle task name is append-solution-section we run the command:

./gradlew :a-plus-b:test :a-plus-b:append-solution-section

Expectations: After the test stage an updated version of the README.md file should be available in the Gradle build directory. The file preview should look as follows:

image

When the new task is being executed for the while project ./gradlew test append-solution-section it should be applied for all existing sub-projects.

ParanoidUser avatar Oct 04 '20 06:10 ParanoidUser