elm-webpack-starter

用于在 Webpack 上开发 Elm 应用程序的 Boilerplate。(Boilerplate for developing Elm apps on Webpack.)

Github星跟踪图

elm-webpack-starter

关于:

  • 用于编写 Elm 应用程序的简单 Webpack 设置:
  • 具有实时重新加载的开发服务器,HMR
  • 支持 CSS/SCSS(带 Autoprefixer),图像 assets
  • Bootstrap 3.3+(Sass版)
  • 捆绑和缩小部署
  • 基本的 app 脚手架,使用 Html.beginnerProgram
  • 一个示例代码片段,可以帮助您入门!

安装:

将此 repo 克隆到新的项目文件夹中,例如 my-elm-project:

git clone https://github.com/moarwick/elm-webpack-starter my-elm-project
cd my-elm-project

将项目文件夹重新初始化为您自己的仓库:

rm -rf .git         # on Windows: rmdir .git /s /q
git init
git add .
git commit -m 'first commit'

使用方便的重新安装脚本安装所有依赖项:

npm run reinstall

这样可以清理(重新)安装所有 npm 和 elm 软件包,以及全局 elm 安装。

在本地服务:

npm start
  • 在 http://localhost:8080/ 访问应用程序
  • 获取编码! 入口点文件是 src/elm/Main.elm
  • 浏览器将在任何文件更改时自动刷新...

为生产(prod)构建和打包

npm run build
  • 文件被保存到 /dist 文件夹
  • 要检查它,请打开 dist/index.html

主要指标

概览
名称与所有者elm-community/elm-webpack-starter
主编程语言JavaScript
编程语言Elm (语言数: 4)
平台Linux, Mac, Windows
许可证
所有者活动
创建于2015-12-31 19:32:20
推送于2021-12-12 20:40:22
最后一次提交2017-10-29 23:23:57
发布数9
最新版本名称v0.8.4 (发布于 2017-01-13 12:19:13)
第一版名称v0.5.1 (发布于 2016-05-11 23:50:11)
用户参与
星数856
关注者数15
派生数106
提交数105
已启用问题?
问题数40
打开的问题数4
拉请求数17
打开的拉请求数6
关闭的拉请求数8
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?

elm-webpack-starter

About:

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.beginnerProgram
  • A snippet of example code to get you started!

Install:

Clone this repo into a new project folder, e.g. my-elm-project:

git clone https://github.com/moarwick/elm-webpack-starter my-elm-project
cd my-elm-project

Re-initialize the project folder as your own repo:

rm -rf .git         # on Windows: rmdir .git /s /q
git init
git add .
git commit -m 'first commit'

Install all dependencies using the handy reinstall script:

npm run reinstall

This does a clean (re)install of all npm and elm packages, plus a global elm install.

Serve locally:

npm start
  • Access app at http://localhost:8080/
  • Get coding! The entry point file is src/elm/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

Changelog

Ver 0.8.6

  • Update Packages (-> Webpack 2)
  • fix paths in file-loader
  • clean up build script

Ver 0.8.5

  • Fix loading path of generated js file, per Issue 47

Ver 0.8.4

  • Fix hot reloading of components, per Issue 44

Ver 0.8.3

  • Update packages
  • Attempt to fix path issues when building for prod (temp)

Ver 0.8.2

  • Webpack config improvements (PR by Lesuk)

Ver 0.8.0

  • Update to Elm 0.18, use debug=true on webpack loader (PR by douglascorrea)
  • Add a script for one-step installs
  • Update to latest packages

Ver 0.7.1

Ver 0.7.0

  • Modify project structure, per Issue 26
  • Include Bootstrap JS, per Issue 28
  • More helpful install steps in README, per Issue 29
  • Update to latest packages

Ver 0.6.2

  • Use copy-webpack-plugin instead of cp to copy files (Windows compatible)

Ver 0.6.0

  • elm-hot-loader is back (no Elm code changes required!)
  • Switch to bootstrap-sass to demo CSS

Ver 0.5.0

  • Update to Elm 0.17.0 (and other latest modules)
  • Upgrade starter code per upgrade-docs
  • Remove elm-hot-loader (for now)

Ver 0.4.0

Ver 0.3.0

  • Use html-webpack-plugin to generate index.html
  • Apply hash filenames for bundled JS and CSS (prevents caching)
  • Image and favicon assets copied to dist/