Turing Machine Puzzler
October 2, 2015 ยท View on GitHub
Setup
- Run
npm install. This will install the correct elm version locally and also runelm-makeas an npm postinstall hook. Whennpm installhas finished there should be a file calledelm.js.
Development Mode
npm run devstarts elm-reactor with the correct ELM_HOME set (alternatively, you could doELM_HOME=node_modules/elm/share node_modules/.bin/elm-reactormanually).- Go to http://localhost:8000/index.debug.html.
- You now see the Elm app in the integrated Elm debugger and live reload enabled.
Pseudo Production Mode
npm startstarts the app in "production mode" by simply building it withelm-makeand then serving it via http-server.- Go to http://localhost:8080/index.html.
- This is the "production" view. No live reload, no debugger.
- If you change the code, you need to rebuild
elm.jsby executingnpm run makeor by stopping the running http-server and executenpm startagain (which will also triggernpm run make).