mirror of
https://github.com/correl/elm.git
synced 2024-11-21 19:18:42 +00:00
Update install/test docs
This commit is contained in:
parent
b15ee1f3f2
commit
a41a6b0468
2 changed files with 5 additions and 5 deletions
|
@ -2,8 +2,8 @@
|
|||
|
||||
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](https://nodejs.org/). Once you have Node.js up and running, follow these steps to install the Elm platform and `elm-test`.
|
||||
If you don't already have Node.js installed on your computer, you can download it from [the official site](https://nodejs.org/). Once you have Node.js up and running, run this command from inside an exercise directory to install the Elm platform and `elm-test`.
|
||||
|
||||
```bash
|
||||
$ npm install --global elm@0.17.1 elm-test@0.17.3
|
||||
$ npm install
|
||||
```
|
||||
|
|
|
@ -2,15 +2,15 @@ The Elm exercise test suites may be run from the exercise directory.
|
|||
|
||||
```bash
|
||||
$ cd exercism/project/directory/elm/hello-world
|
||||
$ elm-test *Tests.elm
|
||||
$ npm install # only required the first time you start an exercise
|
||||
$ npm test
|
||||
```
|
||||
Replace `*` with the name of the exercise you're on, e.g. HelloWorld for the Hello World exercise.
|
||||
|
||||
## Hints and tips
|
||||
|
||||
### Coding the exercise
|
||||
|
||||
The README.md for each exercise gives a general description but the Elm test program will be very specific. Open the test program and give it a quick look - if it seems like cheating, do it anyway. Look for helpful comments, test data, and just the names of the test functions. Try running the test command before you have written anything and see if the error messages give you an idea of where to start.
|
||||
The README.md for each exercise gives a general description, but the Elm test program will be very specific. Open the test program and give it a quick look - if it seems like cheating, do it anyway. Look for helpful comments, test data, and just the names of the test functions. Try running the test command before you have written anything and see if the error messages give you an idea of where to start.
|
||||
|
||||
Your first goal it to get something to compile, even though it fails tests. For this, you should "stub" functions. That means leave the body empty, except for whatever it must return. Write something like `myFunc param = 0` or whatever it takes just to get it to compile. Sometimes to figure out function types you will have to go back to the test program and read in more detail. Once you have figured out all the required function signatures, the test program will complain that `0` is the wrong answer. Now start filling in function bodies.
|
||||
|
||||
|
|
Loading…
Reference in a new issue