https://github.com/farism/gulp-elm-basic
A gulp plugin wrapping node-elm-compiler
https://github.com/farism/gulp-elm-basic
Last synced: about 2 months ago
JSON representation
A gulp plugin wrapping node-elm-compiler
- Host: GitHub
- URL: https://github.com/farism/gulp-elm-basic
- Owner: farism
- License: mit
- Created: 2017-08-31T00:28:08.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-02T07:45:36.000Z (almost 9 years ago)
- Last Synced: 2026-03-21T00:08:01.485Z (3 months ago)
- Language: JavaScript
- Size: 68.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-elm-basic [](https://circleci.com/gh/farism/gulp-elm-basic/tree/master)
Given an `*.elm` file, it will use [`node-elm-compiler`](https://github.com/rtfeldman/node-elm-compiler) to compile and produce vinyl objects.
#### Example
on the elm side
```elm
-- Main.elm
module Main exposing (..)
import Html exposing (Html, div, p)
main : Html a
main =
div [] [ Html.text "hello world" ]
```
on the gulp side
```js
const elm = require('gulp-elm-basic')
gulp.task('compile-elm', () => {
return gulp.src('Main.elm')
.pipe(elmCss())
.pipe(uglifyjs())
.pipe(gulp.dest('build')) // output to /dist/Main.js
})
```