elm-webpack-starter
A simple Webpack setup for writing Elm apps:
- Dev server with live reloading, HMR
- Support for CSS/SCSS (with Autoprefixer), image assets
- Bootstrap 3.3+ (Sass version)
- Bundling and minification for deployment
- Basic app scaffold, using
Html.App
- A snippet of example code to get you started!
Install:
git clone https://github.com/moarwick/elm-webpack-starter cd elm-webpack-starter npm install
If you haven’t done so yet, install Elm globally:
npm install -g elm
Install Elm’s dependencies:
elm package install
Serve locally:
npm start
- Access app at
http://localhost:8080/
- Get coding! The entry point file is
src/Main.elm
- Browser will refresh automatically on any file changes..
Build & bundle for prod:
npm run build
- Files are saved into the
/dist
folder
- To check it, open
dist/index.html
- To publish the
/dist
folder to your own GitHub repo’s gh-pages
, commit any changes, then:
git subtree push --prefix dist origin gh-pages open http://<your-github-account>.github.io/elm-webpack-starter/
Changelog
Ver 0.3.0
- Update to latest NPM module versions
- Use html-webpack-plugin to generate index.html
- Unique hash filenames for bundled JS and CSS (prevents caching)
- Image and favicon assets getting copied to dist/
Ver 0.4.0
- Addelm-hot-loader for HMR support (PR byfluxxu)
Ver 0.5.0
- Update to Elm 0.17.0 (and other latest modules)
- Upgrade starter code perupgrade-docs
- Remove
elm-hot-loader
(for now)
Ver 0.6.0
-
elm-hot-loader
is back (no Elm code changes required!)
- Switch to bootstrap-sass to demo CSS
转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Elm Webpack Starter