# elm-factory

> dev server and build system wrapping elm-reactor

Latest version **0.7.1** (published 2017-09-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install elm-factory
pnpm add elm-factory
yarn add elm-factory
bun add elm-factory
```

Provides the command `elm-factory`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.7.1 |
| Published | 2017-09-05 |
| First published | 2017-08-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 29 |
| Known vulnerabilities | 0 (+8 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 22 |
| Author | Faris Mustafa |
| Maintainers | farismmk |
| Keywords | elm, elm-css, livereload, cli |

## Links

- npm: https://www.npmjs.com/package/elm-factory
- Repository: https://github.com/farism/elm-factory
- Homepage: https://github.com/farism/elm-factory#readme
- Issues: https://github.com/farism/elm-factory/issues
- npm.io page: https://npm.io/package/elm-factory

## Dependencies (29)

- [ora](https://npm.io/package/ora.md) ^1.3.0
- [gulp](https://npm.io/package/gulp.md) ^3.9.1
- [execa](https://npm.io/package/execa.md) ^0.8.0
- [fkill](https://npm.io/package/fkill.md) ^5.0.0
- [yargs](https://npm.io/package/yargs.md) ^8.0.2
- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [cssnano](https://npm.io/package/cssnano.md) ^3.10.0
- [elm-css](https://npm.io/package/elm-css.md) ^0.6.1
- [find-up](https://npm.io/package/find-up.md) ^2.1.0
- [gulp-if](https://npm.io/package/gulp-if.md) ^2.0.2
- [nocache](https://npm.io/package/nocache.md) ^2.0.0
- [postcss](https://npm.io/package/postcss.md) ^6.0.10
- [pumpify](https://npm.io/package/pumpify.md) ^1.3.5
- [fs-extra](https://npm.io/package/fs-extra.md) ^4.0.1
- [url-join](https://npm.io/package/url-join.md) ^2.0.2
- [xxhashjs](https://npm.io/package/xxhashjs.md) ^0.2.1
- [uglify-js](https://npm.io/package/uglify-js.md) ^3.0.28
- [check-types](https://npm.io/package/check-types.md) ^7.3.0
- [gulp-rename](https://npm.io/package/gulp-rename.md) ^1.2.2
- [postcss-url](https://npm.io/package/postcss-url.md) ^7.1.2
- [tmp-promise](https://npm.io/package/tmp-promise.md) ^1.0.3
- [autoprefixer](https://npm.io/package/autoprefixer.md) ^7.1.3
- [browser-sync](https://npm.io/package/browser-sync.md) ^2.18.13
- [run-sequence](https://npm.io/package/run-sequence.md) ^2.1.0
- [async-replace](https://npm.io/package/async-replace.md) ^1.0.1
- [gulp-any-template](https://npm.io/package/gulp-any-template.md) ^0.3.1
- [node-elm-compiler](https://npm.io/package/node-elm-compiler.md) ^4.3.3
- [find-elm-dependencies](https://npm.io/package/find-elm-dependencies.md) ^1.0.1
- [http-proxy-middleware](https://npm.io/package/http-proxy-middleware.md) ^0.17.4

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.7.1 (latest) — 2017-09-05
- 0.7.0 — 2017-09-05
- 0.6.0 — 2017-08-31
- 0.5.0 — 2017-08-26
- 0.4.0 — 2017-08-25
- 0.3.2 — 2017-08-25
- 0.3.1 — 2017-08-25
- 0.3.0 — 2017-08-25

## README

# Elm Factory [![npm version](https://badge.fury.io/js/elm-factory.svg)](https://badge.fury.io/js/elm-factory) [![Travis CI](https://api.travis-ci.org/farism/elm-factory.svg?branch=master)](https://travis-ci.org/farism/elm-factory) [![Coverage Status](https://coveralls.io/repos/github/farism/elm-factory/badge.svg?branch=specs)](https://coveralls.io/github/farism/elm-factory?branch=specs) [![Greenkeeper badge](https://badges.greenkeeper.io/farism/elm-factory.svg)](https://greenkeeper.io/)

An all-in-one, zero-configuration CLI tool for developing, building, and deploying Elm applications. Don't worry about tooling and just code!

### About

Elm is an awesome language. It has a lot of great individual tooling. However, using them all together in some type of workflow can be a bit tedious. On top of that, some of the tools (e.g. `elm-reactor`) lack some basic features that would make them into more full-fledged developer tools.

This is where `Elm Factory` comes in. One of the goals of this project was to not deviate too much from the existing elm tooling ecoystem. It is essentially a CLI tool that is a thin wrapper over a few core libraries while exposing additional functionality, and with only a few basic commands:

- `init` to scaffold new Elm projects
- `dev` to start up an express server to proxy elm-reactor
- `build` to create cache-busted and minified production builds

### Features
- Custom html templates with elm-reactor
- Stylesheet management via elm-css
- CSS injection with livereload
- Define custom proxy endpoints
- Production mode builds with cache-busting

### Getting Started

```sh
# Installation

yarn global add elm-factory
npm install -g elm-factory

# Create a new project

elm-factory init my-app && cd my-app

# Start the elm-factory dev server

elm-factory dev --port=3000 --template=index.dev.hbs

# Build the project for production

elm-factory build --output-path=dist --template=index.prod.hbs
```

Please see the [cli usage](https://github.com/farism/elm-factory/blob/master/guides/cli-usage.md) for a full list of options


### Configuration

Project configuration is available through an `.elmfactoryrc` or `.elmfactoryrc.json` file:

```json
{
  "main": "src/MyApp.elm",
  "build": {
    "html": "index.prod.hbs"
  },
  "dev": {
    "port": 3000,
    "html": "index.dev.hbs"
  }
}
```

Please see the [configuration page](https://github.com/farism/elm-factory/blob/master/guides/configuration.md) for a full list of options

### Underlying Packages

- `elm-reactor` for on-the-fly compilation
- `browser-sync` for proxying and livereload
- `find-elm-dependencies` for dev mode watching
- `node-elm-compiler` for compiling production builds
- `elm-css` for managing stylesheets and extracting css assets
- `gulp` for orchestrating CLI tasks
- `postcss` for css processing and minification
- `uglifyjs` for js minification

### Contributing

Ideas and code contributions are welcome! In lieu of a styleguide, this project uses [prettier](https://github.com/prettier/prettier), [husky](https://github.com/typicode/husky), and [lint-staged](https://github.com/okonet/lint-staged) to maintain code style. If you have any questions, just ask.

### Related projects
- [elm-live](https://github.com/tomekwi/elm-live)
- [elm-webpack-loader](https://github.com/elm-community/elm-webpack-loader)
- [elm-webpack-starter](https://github.com/jiwhiz/elm-bootstrap-webpack-starter)

---
_Source: https://npm.io/package/elm-factory · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
