8c5941e864
We will be moving to a tree-shaped track rather than a linear one, as described in the [progression & learning in Exercism](https://github.com/exercism/docs/blob/master/about/conception/progression.md) design document. In order to support this, we need to expand the metadata that exercises are configured with. Note that 'core' exercises are never unlocked by any other exercises. Core exercises appear in the track in the order that they are listed in the array. Non-core exercises depend on only one exercise (unlocked_by: ). At the moment we are assuming that this is a core exercise, but there is no reason that it needs to be. Until now we have operated with a separate deprecated array. These are now being moved into the exercises array with a deprecated field. With these defaults the track in nextercism will have no core exercises, and all the exercises will be available as 'extras' from the start. If you haven't already, now would be a good time to do the following: * add a rough estimate of difficulty to each exercise (scale: 1-10) * add topics to each exercise * choose *at most 20 exercises* to be core exercises (set core: true, and delete the unlocked_by key) * for each exercise that is not core, decide which exercise is the prerequisite (max 1) If possible, leave 3 or 4 simple exercises as (core: false, unlocked_by: null), as this will provide new participants with some exercises that they can tackle even if they have not finished the first core exercise. |
||
---|---|---|
.github | ||
bin | ||
docs | ||
exercises | ||
img | ||
.gitignore | ||
.travis.yml | ||
config.json | ||
LICENSE | ||
package.json | ||
README.md |
Exercism Elm Track
Exercism Exercises in Elm
Setup
The simplest way to install Elm is via Node.js/NPM.
If you don't already have Node.js installed on your computer, you can download it from the official site. Once you have Node.js up and running, follow these steps to install the Elm platform and elm-test.
$ npm install
Contributing
Thank you so much for contributing! 🎉
Please start by reading the general Exercism contributing guide.
We welcome pull requests that provide fixes and improvements to existing exercises. If you're unsure, then go ahead and open a GitHub issue, and we'll discuss the change.
Please keep the following in mind:
-
Pull requests should be focused on a single exercise, issue, or change.
-
We welcome changes to code style, and wording. Please open a separate PR for these changes if possible.
-
Please open an issue before creating a PR that makes significant (breaking) changes to an existing exercise or makes changes across many exercises. It is best to discuss these changes before doing the work.
-
Follow the coding standards found in The Elm Style Guide. Please consider running elm-format before submitting a pull request.
-
Watch out for trailing spaces, extra blank lines, and spaces in blank lines.
-
Each exercise must stand on its own. Do not reference files outside the exercise directory. They will not be included when the user fetches the exercise.
-
Exercises should use only the Elm core libraries.
-
Please do not add a README or README.md file to the exercise directory. The READMEs are constructed using shared metadata, which lives in the exercism/x-common repository.
-
Each exercise should have a test suite, an example solution, a template file for the real implementation and an
elm-package.json
file with theelm-test
andelm-console
dependencies. The CI build expects files to be named using the following convention. The example solution should be namedExerciseModuleName.example
. The template file should be namedExerciseModuleName.elm
. Test file should be namedTests.elm
. -
The recommended workflow when working on an exercise is to first create the implementation and test files,
ExerciseModuleName.elm
andtests/Tests.elm
. You'll likely want to copy one of the existing exercise directories as a quick start.-
Test the new exercise directly by running
npm test
from the exercise directory. -
Automatically run tests again when you save changes by running
npm run watch
from the exercise directory. -
Once the implementation of the exercise is complete, rename
ExerciseModuleName.elm
toExerciseModuleName.example.elm
and create the templateExerciseModuleName.elm
. -
Make sure everything is good to go by running all tests with
bin/build.sh
.
-
-
Please do not commit any Elm configuration files or directories inside the exercise, such as
elm-stuff
. Please include only the standardelm-package.json
. -
Test files should use the following format:
module Tests exposing (..)
import Test exposing (..)
import Expect
import ExerciseModuleName
tests : Test
tests =
describe "Bob"
[ test "first test" <|
\() ->
True
|> Expect.equal True
, test "second test" <|
\() ->
False
|> Expect.equal False
]
-
All the tests for Exercism Elm Track exercises can be run from the top level of the repo with
bin/build.sh
. Please run this command before submitting your PR. -
If you are submitting a new exercise, be sure to add it to the appropriate place in the
config.json
file. Also, please runbin/fetch-configlet && bin/configlet
to ensure the exercise is configured correctly.
Elm icon
We were unable to find copyright information about the Elm logo, nor information about who designed it. Presumably Evan Czaplicki, creator of the Elm language, also made the logo, and holds copyright. It may also fall within the public domain, since it is a geometric shape. We've adapted the official Elm logo by changing the colors, which we believe falls under "fair use".