berenddeboer / elm-mdc-starter-kit

Starter kit demonstrating recommended use of elm-mdc with hot loading capabilities.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

Build Status

Best practice example of using elm-mdc, the Elm implementation of Google's Material Design for the web, using hot code swapping.

Install

After cloning the repository:

  1. Add the latest elm-mdc:
git submodule init
git submodule update
  1. Install all required packages (includes a local copy of the elm compiler):
npm install

Hot code swapping

Test hot loading:

  1. Run: npm run hot

  2. Point browser at: http://localhost:3009/

  3. Change the button text in src/Main.elm and save. Browser should automatically update.

Whenever you change a .scss or .elm file, your browser will be reloaded, but keep its state.

Production

Create production ready files in the dist directory with:

npm run build

Under the hood

The hot reloading works thanks to the elm-hot-webpack-loader.

About

Starter kit demonstrating recommended use of elm-mdc with hot loading capabilities.


Languages

Language:JavaScript 54.9%Language:Elm 30.8%Language:HTML 10.4%Language:CSS 4.0%