diff --git a/building/tooling/best-practices.md b/building/tooling/best-practices.md index 2f91d2a6..2193c474 100644 --- a/building/tooling/best-practices.md +++ b/building/tooling/best-practices.md @@ -22,10 +22,12 @@ A very helpful command-line tool is [hyperfine](https://github.com/sharkdp/hyper Newer track tooling repos will have access to the following two scripts: -1. `./bin/benchmark.sh`: benchmark the track tooling code ([source code](https://github.com/exercism/generic-test-runner/blob/a6886f4d84d2a2030f766a658c334bbfbe97b79c/bin/benchmark.sh)) -2. `./bin/benchmark-in-docker.sh`: benchmark the track tooling Docker image ([source code](https://github.com/exercism/generic-test-runner/blob/a6886f4d84d2a2030f766a658c334bbfbe97b79c/bin/benchmark-in-docker.sh)) +1. `./bin/benchmark.sh`: benchmark the track tooling code ([source code](https://github.com/exercism/generic-test-runner/blob/main/bin/benchmark.sh)) +2. `./bin/benchmark-in-docker.sh`: benchmark the track tooling Docker image ([source code](https://github.com/exercism/generic-test-runner/blob/main/bin/benchmark-in-docker.sh)) -If you're working on a track tooling repo without these files, feel free to copy them into your repo. +```exercism/note +If you're working on a track tooling repo without these files, feel free to copy them into your repo using the above source links. +``` ```exercism/caution Benchmarking scripts can help estimate the tooling's performance. diff --git a/building/tracks/new/add-first-exercise.md b/building/tracks/new/add-first-exercise.md index d7c28f12..4d62bbb0 100644 --- a/building/tracks/new/add-first-exercise.md +++ b/building/tracks/new/add-first-exercise.md @@ -79,6 +79,33 @@ bin/fetch-configlet bin/configlet create --practice-exercise hello-world ``` +### Set author + +To have the website list you as the exercise's author, follow these steps: + +Within the exercise's `.meta/config.json` file: + +- Add your GitHub username to the `authors` key + +For this to work, you'll need link your Exercism account to GitHub. +You can do this on the website in the [Settings page's Integrations section](https://exercism.org/settings/integrations). + +```exercism/note +Exercise authors are also awarded [reputation](/docs/using/product/reputation) +``` + +### Use script + +Newer track repos can use the `bin/add-practice-exercise` script ([source](https://github.com/exercism/generic-track/blob/main/bin/add-practice-exercise)) to add new exercises: + +```shell +bin/add-exercise -a two-fer +``` + +```exercism/note +If you're working on a track repo without this file, feel free to copy them into your repo using the above source link. +``` + ### Implement exercise Once the scaffolded files have been created, you'll then have to: @@ -86,8 +113,6 @@ Once the scaffolded files have been created, you'll then have to: - Add tests to the tests file - Add an example implementation - Define the stub file's contents -- Within the exercise's `.meta/config.json` file: - - Add the GitHub username of the exercise's authors to the `authors` key #### Add tests diff --git a/building/tracks/new/add-initial-exercises.md b/building/tracks/new/add-initial-exercises.md index 22ed938b..bc0555c5 100644 --- a/building/tracks/new/add-initial-exercises.md +++ b/building/tracks/new/add-initial-exercises.md @@ -106,14 +106,21 @@ To make this all a bit more concrete, this is what a sample selection of initial ### Scaffold exercise Having selected the exercises you want include in your track, the next step is to implement them. -You can quickly scaffold a new Practice Exercise by running the following commands from the track's root directory: +You can quickly scaffold a new Practice Exercise by running the `bin/add-practice-exercise` script ([source](https://github.com/exercism/generic-track/blob/main/bin/add-practice-exercise)) from the track's root directory: ```shell -bin/fetch-configlet -bin/configlet create --practice-exercise +bin/add-exercise ``` -For more information, check the [`configlet create` docs](/docs/building/configlet/create) +Optionally, you can also specify the exercise's difficulty (via `-d`) and/or author's GitHub username (via `-a`): + +```shell +bin/add-practice-exercise -d 3 -a foobar +``` + +```exercism/note +If you're working on a track repo without this file, feel free to copy them into your repo using the above source link. +``` ### Implement exercise