From 122e62aee5fa825c667c0e1eb60a433bd99cb3ce Mon Sep 17 00:00:00 2001 From: Divlo Date: Thu, 30 Sep 2021 13:25:24 +0200 Subject: [PATCH] docs: clarify usage of the project to contribute --- CONTRIBUTING.md | 8 +++++--- README.md | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8955687..ce354ba 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,7 @@ Thanks a lot for your interest in contributing to **programming-challenges**! - [Submit a challenge](#submit-a-challenge) - [Submit a solution](#submit-a-solution) -- [Add support for a new language](#add-a-language) +- [Add support for a new language](#add-a-programming-language) - Correct spelling errors, improvements or additions to documentation files (README, CONTRIBUTING...). ## Submit a challenge @@ -27,14 +27,16 @@ Start writing some code, inside the `solution` file with your favorite programmi Before submitting the solution, make sure it passes all the tests by running `programming-challenges run test --affected`. -## Add a language +## Add a programming language You can add support for a new language, so you can solve the challenges with even more programming languages! - First create a new folder inside `templates/docker` with the file extension of the new programming language (e.g: `js`, `cpp`, etc.) - Inside this new folder create a `Dockerfile`, to compile and execute the solution - Create a new template inside `templates/solution` folder with the file extension of the new programming language, with the basic boilerplate to read from `stdin` and print to `stdout` the result -- Run the command `programming-challenges generate solution --challenge="" --github-user="" --language="" --solution="` +- Every programming language should have at least one working solution for `challenges/hello-world`. + +To do so, run the command `programming-challenges generate solution --challenge="hello-world" --github-user="" --language="" --solution="function` Before submitting the new programming language, make sure it passes all the tests by running `programming-challenges run test --affected` diff --git a/README.md b/README.md index 99a4ea7..733e244 100644 --- a/README.md +++ b/README.md @@ -77,10 +77,10 @@ programming-challenges --help programming-challenges generate challenge --github-user="YourGitHubName" --challenge="challenge-name" # Generate a new solution -programming-challenges generate solution --github-user="YourGitHubName" --challenge="hello-world" --solution="solution-name" --language="python" +programming-challenges generate solution --github-user="YourGitHubName" --challenge="challenge-name" --solution="function" --language="python" # Test a solution -programming-challenges run test --challenge="hello-world" --solution="solution-name" --language="python" +programming-challenges run test --challenge="challenge-name" --solution="function" --language="python" ``` ## 💡 Contributing