Create Elm App

创建零配置的 Elm 应用程序。(Create Elm apps with zero configuration.)

Github星跟踪图

Create Elm App

创建没有构建配置的Elm应用程序。

快速开始

npm install create-elm-app -g
create-elm-app my-app
cd my-app/
elm-app start

使用 elm-app 构建创建生产构建。

入门

安装

安装需要 Node >= 8。

Yarn

yarn global add create-elm-app

NPM

npm install create-elm-app -g

如果您运行的是Linux操作系统,则应以超级用户身份安装它:

sudo npm install create-elm-app -g

创建应用程序

要创建一个新应用程序,请运行

create-elm-app my-app
cd my-app/

这会创建一个新的 my-app 文件夹,其中包含未来项目的文件。

my-app/
├── .gitignore
├── README.md
├── elm.json
├── elm-stuff
├── public
│   ├── favicon.ico
│   ├── index.html
│   ├── logo.svg
│   └── manifest.json
├── src
│   ├── Main.elm
│   ├── index.js
│   ├── main.css
│   └── registerServiceWorker.js
└── tests
    └── Tests.elm

您已准备好使用Create Elm App的全部功能!

elm-app 开始

在开发模式下运行应用程序。 打开 http://localhost:3000 以在浏览器中查看它。

如果您进行编辑,页面将重新加载。 您将在控制台和浏览器窗口中看到构建错误和lint警告。

elm-app 构建

将生产应用程序构建到构建文件夹。 它捆绑了 Elm app 并优化了构建以获得最佳性能。

构建被缩小,文件名包含哈希。

主要指标

概览
名称与所有者halfzebra/create-elm-app
主编程语言JavaScript
编程语言JavaScript (语言数: 4)
平台Linux, Mac, Windows
许可证MIT License
所有者活动
创建于2016-09-04 18:44:08
推送于2025-04-18 13:32:14
最后一次提交2023-11-05 00:10:59
发布数151
最新版本名称v5.22.0 (发布于 )
第一版名称0.1.2 (发布于 2016-09-11 20:22:29)
用户参与
星数1.7k
关注者数21
派生数147
提交数1k
已启用问题?
问题数214
打开的问题数32
拉请求数332
打开的拉请求数20
关闭的拉请求数49
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?

Create Elm App npm version Build Status Build Status

Create Elm apps with no build configuration.

Quickstart

npm install create-elm-app -g
create-elm-app my-app
cd my-app/
elm-app start

Create a production build with elm-app build

Getting Started

Installation

Node >=8 is required for installation.

Yarn

yarn global add create-elm-app

NPM

npm install create-elm-app -g

If you are running Linux OS, you should install it as the superuser:

sudo npm install create-elm-app -g

Creating an App

To create a new app, run:

create-elm-app my-app
cd my-app/

create-elm-app

Create a new my-app folder with files for your future project.

my-app/
├── .gitignore
├── README.md
├── elm.json
├── elm-stuff
├── public
│   ├── favicon.ico
│   ├── index.html
│   ├── logo.svg
│   └── manifest.json
├── src
│   ├── Main.elm
│   ├── index.js
│   ├── main.css
│   └── serviceWorker.js
└── tests
    └── Tests.elm

You are ready to employ the full power of Create Elm App!

elm-app start

Run the app in development mode.
Open http://localhost:3000 to view it in the browser.

elm-app-start

The page will reload if you make edits.
You will see the build errors and lint warnings in the console and the browser window.

elm-app build

Builds the app for production to the build folder.
It bundles Elm app and optimizes the build for the best performance.

The build is minified, and the filenames include the hashes.

Guide

Every generated project will contain a readme with guidelines for future development.
The latest version is available here

Why use this?

Developing with Elm is fun and easy, but at some point, you will hit a couple of limitations.

Create Elm App adds a tool for optimizing production builds and running a development server with your app, which supports HMR.

All of that, combined with all the functionality of elm in a single command line tool, which you might use as a dependency or eject anytime.

Want a custom setup?

Not happy with the default configuration? Use elm-app eject and customize your process.

That way, you can use Create Elm App as a tool for a boilerplate generation.

Philosophy

Inspired by create-react-app

  • One Dependency: There is just one build dependency. It uses Elm Platform, Webpack, and other amazing projects, but provides a cohesive curated experience on top of them.

  • Zero Configuration: No configuration files or command line options required to start working with Elm. Configuring both development and production builds is handled for you so you can focus on writing code.

  • No Lock-In: You can “eject” to a custom setup at any time. Run a single command, and all the configuration and build dependencies will be moved directly into your project, so you can pick up right where you left off.

What is inside

The tools used by Create Elm App are subject to change.
Currently it is a thin layer on top of many amazing community projects, such as:

All of them are transitive dependencies of the provided npm package.

Contributing

We would love to get you involved! Please check our Contributing Guide to get started!

Alternatives