Best practice example of using elm-mdc, the Elm implementation of Google's Material Design for the web, using hot code swapping.
After cloning the repository:
- Add the latest elm-mdc:
git submodule init
git submodule update
- Install all required packages (includes a local copy of the elm compiler):
npm install
Test hot loading:
-
Run:
npm run hot
-
Point browser at:
http://localhost:3009/
-
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.
Create production ready files in the dist
directory with:
npm run build
The hot reloading works thanks to the elm-hot-webpack-loader.