How to Create Elm App
Create Elm App is a command-line tool to ease getting started-experience and help you bootstrap and develop your Elm applications without any configuration done from your side, so you can focus on the code!
It is heavily inspired by the Create React App developed by Dan Abramov from Facebook and other awesome developers from React community.
Getting Started
Installation
Node.js 4.x and above is the only dependency for installing Create Elm App
npm install -g create-elm-app
Creating an App
When the installation is ready you can create your Elm app.
create-elm-app my-app
Give it a couple seconds while elm-package is installing core modules for your application behind the scenes.
When installation is finished you are ready to go with your new app!
The file structure is minimalistic and provides you only with the main entry points for writing your code.
my-app/
.gitignore
README.md
elm-package.json
src/
favicon.ico
index.html
index.js
main.css
Main.elm
Building for production
You can get a fully optimized and production-ready build of your newly created application by running the following command in the root directory of your project:
cd my-app/
elm-app build
Starting development server
During the development process you can start a server which will enable you to access your application by visiting http://localhost:3000/
elm-app start
It is configured to use Hot Module Replacement with elm-hot-loader automatically so that you can see the changes without reloading the page multiple times.
Installing Elm packages
http://package.elm-lang.org/ offers you a lot of awesome packages to use in your app.
To install one, type the following command in your terminal:
elm-app package install evancz/elm-http -y
No lock-on
You don’t have to stay with Create Elm App forever and if you are not satisfied with some decisions you can always do:
elm-app eject
And take over the build configuration so you can play with it and find what fits you best!
Any feedback is very welcome.