{"id":25691,"library":"gulp-elm","title":"gulp-elm","description":"Gulp plugin to compile Elm files using the Elm compiler. Version 0.8.2 supports Elm 0.19 only; earlier versions (0.7.x) support Elm 0.18. The plugin wraps Vinyl streams, providing `elm.make()` for single files and `elm.bundle()` for multiple entry files. Key options include `optimize`, `debug`, `cwd`, and custom `elm` binary path. Differentiators: simple integration with Gulp, bundle mode, and support for `--optimize` and `--debug` flags. Release cadence is sporadic, last updated in 2019.","status":"maintenance","version":"0.8.2","language":"javascript","source_language":"en","source_url":"https://github.com/philopon/gulp-elm","tags":["javascript","gulpplugin","elm"],"install":[{"cmd":"npm install gulp-elm","lang":"bash","label":"npm"},{"cmd":"yarn add gulp-elm","lang":"bash","label":"yarn"},{"cmd":"pnpm add gulp-elm","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Vinyl file abstraction used for Gulp streams","package":"vinyl","optional":false},{"reason":"Stream transformation","package":"through2","optional":false}],"imports":[{"note":"Default import returns an object with `make` and `bundle` methods. CommonJS require works but ESM is preferred.","wrong":"const elm = require('gulp-elm')","symbol":"default","correct":"import elm from 'gulp-elm'"},{"note":"Named export for the compile function.","wrong":"const make = require('gulp-elm').make","symbol":"make","correct":"import { make } from 'gulp-elm'"},{"note":"Named export for the bundling function.","wrong":"","symbol":"bundle","correct":"import { bundle } from 'gulp-elm'"}],"quickstart":{"code":"import gulp from 'gulp';\nimport elm from 'gulp-elm';\n\ngulp.task('elm', () => {\n  return gulp.src('src/Main.elm')\n    .pipe(elm.make({ optimize: true }))\n    .pipe(gulp.dest('dist/'));\n});\n\ngulp.task('elm-bundle', () => {\n  return gulp.src('src/**/Main.elm')\n    .pipe(elm.bundle('bundle.js', { optimize: true }))\n    .pipe(gulp.dest('dist/'));\n});","lang":"javascript","description":"Shows basic usage of elm.make() and elm.bundle() with Gulp, including optimize option."},"warnings":[{"fix":"For Elm 0.18, install gulp-elm@0.7.3.","message":"Version 0.8.0 drops support for Elm 0.18 and earlier; use 0.7.x for those versions.","severity":"breaking","affected_versions":">=0.8.0"},{"fix":"Set cwd to the project root, e.g., { cwd: './src' } if elm.json is there.","message":"The `cwd` option must point to the directory containing elm.json, not the source files.","severity":"gotcha","affected_versions":">=0.7.0"},{"fix":"Use elm-make's native warning output; warnings appear on stderr.","message":"The `warn` option was removed in version 0.8.0.","severity":"deprecated","affected_versions":">=0.8.0"},{"fix":"Always call elm.make() or elm.bundle() directly.","message":"Using `elm()` without specifying `make` or `bundle` is deprecated; use `elm.make()` explicitly.","severity":"gotcha","affected_versions":">=0.8.0"},{"fix":"Do not rely on exact error string formatting; check for error existence.","message":"Error messages changed format in 0.8.2; parsing errors may differ.","severity":"breaking","affected_versions":">=0.8.2"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `elm make` manually to see full error output, or check elm.json and source files.","cause":"Elm compilation error, possibly due to missing dependencies or syntax errors.","error":"Error: elm-make exited with code 1"},{"fix":"Use elm.make(options) or elm.bundle(output, options) directly.","cause":"Misunderstanding default import: using elm() instead of elm.make() or elm.bundle().","error":"TypeError: elm is not a function"},{"fix":"Run `npm install gulp-elm --save-dev`.","cause":"Package not installed or missing in node_modules.","error":"Cannot find module 'gulp-elm'"},{"fix":"Pass a string as the first argument: elm.bundle('output.js', options).","cause":"Missing or invalid output file argument to bundle.","error":"The output file must be a string for elm.bundle()"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}