Command line tool to generate a new Elm project's basic structure
Shell Elm Batchfile Other JavaScript Makefile Ruby
Latest commit c836cdd Jan 12, 2017 @simonewebdesign committed on GitHub Merge pull request #16 from simonewebdesign/homebrew
Add Homebrew formula and update installation instructions

README.md

elm new Build Status

Clojure has lein new, Elixir has mix new and now Elm has elm new!

With elm new you can easily start a new Elm project from the command line.

The idea is to be able to start coding right away instead of wasting time setting up the initial Elm architecture boilerplate. This is especially useful if you do a lot of prototyping.

Features

  • Template based — choose between Html.program, Html.beginnerProgram and Navigation.program
  • No dependencies — all you need is a shell (like bash, zsh, fish, etc.)
  • Very simple to install and use. 100% test covered. It just works!

Usage

elm new                        # Initialize an Html.program in the current directory
elm new my-project             # Initialize an Html.program in my-project/
elm new my-project --beginner  # Initialize an Html.beginnerProgram in my-project/
elm new my-spa --navigation    # Initialize a Navigation.program in my-spa/
elm new hello --hello-world    # Initialize an "Hello, world!" program in hello/
elm new --version              # Prints the installed version
elm new --help                 # Prints all possible commands

Example

$ elm new my-awesome-project

my-awesome-project
├── .gitignore
├── README.md
├── elm-package.json
└── src
    └── Main.elm

1 directory, 4 files

Your Elm program has been created successfully.
You can use "elm-make" to compile it:

    cd my-awesome-project
    elm-make src/Main.elm

Run "elm" for more commands.

Installation

Linux, Mac OS X and Windows are supported.

npm

npm install -g elm-new

Homebrew

brew install https://raw.githubusercontent.com/simonewebdesign/elm-new/master/elm-new.rb

See here for other installation options.