The purpose of this document is to make it easier for new contributors to get up-to-speed on the project.
The project uses Node.js and NPM as the runtime and package manager. You can download them from this link.
We use Gulp as our build tool. You can use NPM to install it:
npm install -g gulp
The easiest way to install the Elm tooling is using NPM. Here's a list of Elm tools we use:
npm install -g elm
npm install -g elm-test
npm install -g elm-format
npm install -g elm-live
Installing an elm-format git pre-commit hook
If you wish to run elm-format on files that you are commiting to git, copy the following script to morphir-elm/.git/pre-commit and make it executable:
STAGED_ELM_FILES=$(git diff --cached --name-only --diff-filter=ACMR | grep ".elm$")
# If any elm-format command fails, exit immediately with that command's exit status
set -eo pipefail
if [[ -n "$STAGED_ELM_FILES" ]] ; then
# Run elm-format against staged elm files for this commit
for ELM_FILE in $STAGED_ELM_FILES ; do
elm-format --yes "$ELM_PATH"
By default elm-format will be run for each file ending in '.elm', when they are commited. If you don't wish to run elm-format, use the '--no-verify' option with your commit command.
In order to contribute to this project you need to be familiar with Elm and understand some language processing / compiler concepts that are core to Morphir. We collected a series of learning materials for you to make it easier to fill any knowledge gaps. Feel free to skip any of these if you feel like you are an expert. If you have any doubts though it's better to glance through them. We included the length of each video so that you understand the amount of effort involved.
- Programming in Elm
- Language Overview
- Working with Types
- Language processing