create-elm-app is a free, open source build & deployment project written in JavaScript and released under MIT. It has 1,675 GitHub stars, 146 forks and 54 open issues, and was last pushed 9 days ago. On this registry it ranks #51 of 84 tracked projects in Build & Deployment, with 5 head-to-head comparisons available.

What is create-elm-app?

Create Elm App is a zero-configuration command line tool that scaffolds, runs, and builds Elm applications, aimed at developers who want a working Elm project with hot module replacement and an optimized production build without writing webpack configuration by hand.

What it is

Create Elm App is a scaffolding and build tool for the Elm ecosystem, written in JavaScript and released under the MIT licence. It installs as a global npm or Yarn package and exposes the create-elm-app generator alongside the elm-app command line tool. The project is inspired by create-react-app and follows the same philosophy: one build dependency, no configuration files or command line options required to start, and no lock-in because the generated setup can be ejected to a custom one at any time. It uses Elm Platform, Webpack, and other projects underneath, but presents them as a single curated experience.

The concrete problem it solves is the gap between Elm's own tooling and the JavaScript and CSS pipeline most projects need. elm-make has limited support for working with JavaScript and CSS, and elm-reactor does not work with applications that rely on ports; neither offers Hot Module Replacement. Create Elm App replaces that hand-rolled setup with a development server that supports HMR and a production build that is minified and carries hashed filenames.

Key capabilities

  • create-elm-app my-app generates a project containing elm.json, src/Main.elm, src/index.js, src/main.css, src/serviceWorker.js, tests/Tests.elm, and a public/ folder with index.html, favicon.ico, logo.svg, and manifest.json.
  • elm-app start runs the app in development mode on http://localhost:3000, reloads the page on edits, and reports build errors and lint warnings in the console and the browser window.
  • elm-app build produces a production bundle in the build folder, minified, with hashes in the filenames.
  • Hot Module Replacement through Webpack, which elm-reactor and elm-make do not provide.
  • Support for Elm ports, so applications that interoperate with JavaScript can be developed and built.
  • elm-app eject moves the project to a custom configuration, letting the tool double as a boilerplate generator.
  • Each generated project ships with a README.md user guide covering guidelines for future development.

Who uses it and how

  • Elm developers starting a new single-page application; the Elm SPA example by Richard Feldman is built with Create Elm App.
  • Teams that want one build dependency instead of maintaining their own Webpack, Elm, and CSS pipeline.
  • Teams that outgrow the defaults, ejecting at any point to take over the configuration while keeping the tool as a boilerplate generator.
  • Developers arriving from create-react-app, who get the same workflow shape: global install, create-elm-app my-app, cd my-app, elm-app start.
  • Linux users, who are instructed to install the package as superuser with sudo npm install create-elm-app -g.

Getting started

Install with npm install create-elm-app -g or yarn global add create-elm-app; Node >= 8 is required. Then run create-elm-app my-app, cd my-app, and elm-app start, building for production with elm-app build.

How it compares

Among the tools the project names, create-react-app is the direct model: Create Elm App copies its one dependency, zero configuration, and no lock-in principles and applies them to Elm. Against Elm's own tooling, it fills the gaps in elm-make and elm-reactor by adding JavaScript and CSS handling, port support, Hot Module Replacement, and an optimized production build on top of Webpack.

When to use it โ€” and when not to

Adopt it when a new Elm project needs a development server with HMR and an optimized production build, and the team accepts a global CLI install with Node >= 8 as the floor. Do not pick it if the project already has a curated Elm and Webpack pipeline, needs build customization beyond the defaults but is unwilling to eject, or cannot tolerate a global npm install or sudo on Linux. The repository carried 54 open issues at the time of writing, so the issue tracker is worth checking before committing.

project readme (upstream, from github) โ€” read inline

Create Elm App npm version Build Status Build Status

Create Elm apps with no build configuration.

Quickstart

npm install create-elm-app -g
create-elm-app my-app
cd my-app/
elm-app start

Create a production build with elm-app build

Getting Started

Installation

Node >=8 is required for installation.

Yarn

yarn global add create-elm-app

NPM

npm install create-elm-app -g

If you are running Linux OS, you should install it as the superuser:

sudo npm install create-elm-app -g

Creating an App

To create a new app, run:

create-elm-app my-app
cd my-app/

create-elm-app

Create a new my-app folder with files for your future project.

my-app/
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ elm.json
โ”œโ”€โ”€ elm-stuff
โ”œโ”€โ”€ public
โ”‚   โ”œโ”€โ”€ favicon.ico
โ”‚   โ”œโ”€โ”€ index.html
โ”‚   โ”œโ”€โ”€ logo.svg
โ”‚   โ””โ”€โ”€ manifest.json
โ”œโ”€โ”€ src
โ”‚   โ”œโ”€โ”€ Main.elm
โ”‚   โ”œโ”€โ”€ index.js
โ”‚   โ”œโ”€โ”€ main.css
โ”‚   โ””โ”€โ”€ serviceWorker.js
โ””โ”€โ”€ tests
    โ””โ”€โ”€ Tests.elm

You are ready to employ the full power of Create Elm App!

elm-app start

Run the app in development mode. Open http://localhost:3000 to view it in the browser.

elm-app-start

The page will reload if you make edits. You will see the build errors and lint warnings in the console and the browser window.

elm-app build

Builds the app for production to the build folder. It bundles Elm app and optimizes the build for the best performance.

The build is minified, and the filenames include the hashes.

Guide

Every generated project will contain a readme with guidelines for future development. The latest version is available here

Why use this?

Developing with Elm is fun and easy, but at some point, you will hit a couple of limitations.

Create Elm App adds a tool for optimizing production builds and running a development server with your app, which supports HMR.

All of that, combined with all the functionality of elm in a single command line tool, which you might use as a dependency or eject anytime.

Want a custom setup?

Not happy with the default configuration? Use elm-app eject and customize your process.

That way, you can use Create Elm App as a tool for a boilerplate generation.

Philosophy

Inspired by create-react-app

  • One Dependency: There is just one build dependency. It uses Elm Platform, Webpack, and other amazing projects, but provides a cohesive curated experience on top of them.

  • Zero Configuration: No configuration files or command line options required to start working with Elm. Configuring both development and production builds is handled for you so you can focus on writing code.

  • No Lock-In: You can โ€œejectโ€ to a custom setup at any time. Run a single command, and all the configuration and build dependencies will be moved directly into your project, so you can pick up right where you left off.

What is inside

The tools used by Create Elm App are subject to change. Currently it is a thin layer on top of many amazing community projects, such as:

All of them are transitive dependencies of the provided npm package.

Contributing

We would love to get you involved! Please check our Contributing Guide to get started!

Alternatives

Frequently asked questions

Is create-elm-app free to use?

create-elm-app is open source under the MIT licence. There is no licence fee and no seat count โ€” you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does create-elm-app do?

๐Ÿƒ Create Elm apps with zero configuration

What is create-elm-app written in?

create-elm-app is primarily written in JavaScript. Its source is publicly available at https://github.com/halfzebra/create-elm-app, and it has 1,675 GitHub stars.