-
Notifications
You must be signed in to change notification settings - Fork 1
/
modd.conf
33 lines (25 loc) · 1.07 KB
/
modd.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Elm compiler is able to produce helpfully colorized error messages.
# Unfortunately these colors won't make it through webpack and elm-webpack-loader.
#
# As a workaround we can use modd alongside with webpack.
#
# And even then elm-make will output color-codes only if output goes to a terminal,
# not through a pipe. There are several ways to do this, see:
# https://github.com/cortesi/modd/issues/26
#
# Here we use the utility `unbuffer` from the the tool `expect`, which is available
# for most Linux distros and for OSX.
# https://www.nist.gov/services-resources/software/expect
### Create output directories
./dist {
prep: mkdir -p dist
}
### Compile Elm source when changed
src/**/*.elm {
# Using `unbuffer` keeps the compiler's output colorful.
# See here how to get `unbuffer` and about alternatives:
# https://github.com/cortesi/modd/issues/26
prep: unbuffer elm make --yes --output dist/.modd.js src/Main.elm
# If you don't have `unbuffer` please use the following line instead.
# prep: elm make --yes --output dist/.modd.js src/Main.elm
}