Skip to content

igray/elm-brunch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elm-brunch

Brunch plugin to compile Elm code

Install Elm

Elm installation instructions

Install elm-brunch

npm install --save elm-brunch

Tips

Update the "source-directories" property in the elm-package.json file if you want to compile multi-file elm projects. Then configure elm-brunch:

  // Configure your plugins in brunch-config.js (or .coffee)
    plugins: {
      ...

      elmBrunch: {
        // Set to path where elm-package.json is located, defaults to project root (optional)
        // if your elm files are not in /app then make sure to configure paths.watched in main brunch config
        elmFolder: 'path/to/elm-files',

        // Set to the elm file(s) containing your "main" function
        // `elm make` handles all elm dependencies (required)
        // relative to `elmFolder`
        mainModules: ['source/path/YourMainModule.elm'],

        // Defaults to 'js/' folder in paths.public (optional)
        outputFolder: 'some/path/',

        // If specified, all mainModules will be compiled to a single file (optional and merged with outputFolder)
        outputFile: 'elm.js',

        // optional: add some parameters that are passed to elm-make
        makeParameters : ['--warn']
      }
   }

The output filename is the lowercase version of the main module name:

YourMainModule.elm => outputFolder/yourmainmodule.js

Examples

The following repos are examples of elm-brunch configuration:

About

Brunch plugin to compile Elm code

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%