This package has been deprecated

Author message:

This package has been superseded by elm-webpack-loader.

ulmus-loader

0.2.0 • Public • Published

Elm loader for webpack Version Build Status Dependency Status

Compile Elm files using the awesome node-elm-compiler.

Installation

$ npm install --save ulmus-loader

Usage

Documentation: Using loaders

In your webpack.config.js file:

module.exports = {
  module: {
    preLoaders: [{
      test:    /\.elm$/,
      exclude: /node_modules/,
      loader: 'expose?Elm!exports?Elm!ulmus?output=tmp/[name].js'
    }]
  },
 
  ulmus: {
    // You can also specify the output name or pattern here.
    output: 'tmp/[name].js',
 
    // Set `emitErrors` to `true` to display warnings as errors.
    emitErrors: true
  }
};

Filename templates

You can configure a custom filename template for your file using the query parameter output. For instance, to copy a file from your context directory into the output directory retaining the full directory structure, you might use ?output=[path][name].js in the query, or add this to your options:

ulmus: {
  output: 'tmp/[path][name].js'
}

The default is tmp/[name].js.

Filename template placeholders

  • [ext] the extension of the resource
  • [name] the basename of the resource
  • [path] the path of the resource relative to the context query parameter or option.
  • [hash] the hash or the content
  • [<hashType>:hash:<digestType>:<length>] optionally you can configure
    • other hashTypes, i. e. sha1, md5, sha256, sha512
    • other digestTypes, i. e. hex, base26, base32, base36, base49, base52, base58, base62, base64
    • and length the length in chars
  • [N] the N-th match obtained from matching the current file name against the query param regExp

Meta

Contributors

License

Copyright (c) 2015 Daniel Perez Alvarez (unindented.org). This is free software, and may be redistributed under the terms specified in the LICENSE file.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Published

Version History

  • Version
    Downloads (Last 7 Days)
    • Published

Package Sidebar

Install

npm i ulmus-loader

Weekly Downloads

6

Version

0.2.0

License

none

Last publish

Collaborators

  • unindented