0.0.12 • Published 1 year ago

esbuild-plugin-elm v0.0.12

Weekly downloads
101
License
MIT
Repository
github
Last release
1 year ago

esbuild-plugin-elm

An esbuild plugin for building elm projects

npm

Install

Add this plugin to your project's dev-dependencies by running the following -

yarn add -D esbuild-plugin-elm
// OR
npm install -D esbuild-plugin-elm

Usage

A simple example can be found in ./example.

esbuild.build({
  entryPoints: ['src/index.js'],
  bundle: true,
  outfile: 'dist/bundle.js',
  plugins: [
    ElmPlugin(options) // options are documented below
  ],
}).catch(e => (console.error(e), process.exit(1)))

Import paths

Import paths will be resolved using the paths listed in source-directories in elm.json. If none resolve, the import is assumed to be relative to the importing file.

Options

  • debug (default: false):

    Enable the time-travelling debugger

  • optimize (default: NODE_ENV === 'production'):

    Optimize the js output (true by default if NODE_ENV is production)

  • pathToElm (default: node_modules/.bin/elm || elm):

    Specify an explicit path to the elm executable

  • clearOnWatch (default: false):

    Clear the console before re-building on file changes

  • cwd (default: <PWD>):

    The current working directory/elm project root

  • verbose (default: false):

    Enable verbose output of node-elm-compiler

Tutorials

0.0.12

1 year ago

0.0.11-1

2 years ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.0

3 years ago