var gulp = require('gulp');
var elm = require('gulp-elm');
gulp.task('elm-init', elm.init);
gulp.task('elm', ['elm-init'], function(){
return gulp.src('src/*.elm')
.pipe(elm())
.pipe(gulp.dest('dist/'));
});
gulp.task('elm-bundle', ['elm-init'], function(){
return gulp.src('src/*.elm')
.pipe(elm.bundle('bundle.js'))
.pipe(gulp.dest('dist/'));
});
execute elm-make --yes
.
If you compile multi file, all elm tasks depends on elm.init
task.
-
elmMake
(default:"node_modules/.bin/elm-make"
if it exists, otherwise"elm-make"
)elm-make
executable file.
compile elm files.
-
yesToAllPrompts
(default:true
)add
--yes
option toelm-make
. -
elmMake
(default:"node_modules/.bin/elm-make"
if it exists, otherwise"elm-make"
)elm-make
executable file. -
filetype
(default:"js"
)elm output file type.
"js"
(or"javascript"
) or"html"
. -
warn
(default:false
)add
--warn
option toelm-make
-
debug
(default:false
)add
--debug
option toelm-make
(for Elm 0.18)
compile and bundle elm files into a single file.
you must pass the name of the output file
-
yesToAllPrompts
(default:true
)add
--yes
option toelm-make
. -
elmMake
(default:"node_modules/.bin/elm-make"
if it exists, otherwise"elm-make"
)elm-make
executable file. -
warn
(default:false
)add
--warn
option toelm-make
-
debug
(default:false
)add
--debug
option toelm-make
(for Elm 0.18)