0.0.19 • Published 6 years ago

elm-app v0.0.19

Weekly downloads
7
License
MIT
Repository
github
Last release
6 years ago

elm-app NPM Version

Create Elm 0.19 + Webpack 4 apps with no build configuration.

Similar to create-react-app and create-elm-app.

Stability Notice: This is basically my own weekend-ware tool that is currently an inferior version of create-elm-app. This will be a test bed of some other ideas I've wanted from a CLI Elm toolkit, is highly unstable, and is unfit for serious use.

Features

  • Handles Webpack config so you don't have to.
  • Supports Elm 0.19's new --optimize.
  • Compiles modern JavaScript to ES5.
  • Hot-reloads as you edit files.
  • Sass support.

Install

Install it as a global executable.

npm install -g elm-app

Usage

Generate a fresh Elm project:

elm-app init foo

Run it in development mode:

elm-app start

Compile it for production:

elm-app build

(TODO) Deploy:

elm-app deploy github
elm-app deploy netlify
elm-app deploy s3

(TODO) Abandon:

elm-app eject

Scaffolding

This is the structure that elm-app init <path> generates.

.
├── README.md
├── elm.json           # elm deps
├── package.json       # npm deps
├── src
│   ├── Main.elm       # root elm component, begin hacking here
│   ├── index.css      # root css file that can @import other css files
│   └── index.js       # root javascript file, webpack entrypoint
└── public
    ├── index.html     # root html file, Main.elm mounts to it
    ├── favicon.ico
    └── img
        └── elm.png

Production

Compile your app into a build/ folder, optimized and ready to be deployed:

elm-app build

.
└── build
    ├── index.html
    ├── main-5df766af.js
    ├── main-60b725f1.css
    └── img
        └── ...

Host it locally to see how it turned out:

cd build
python -m SimpleHTTPServer 5000

License

MIT