Skip to main content
Travis CI Covearge Status Latest release Python versions License

Elm filter for webassets

Filter for compiling Elm files using webassets.

Install

pip install webassets-elm

As of version 0.2.0, this plugin requires Elm 0.19 or newer (building with elm make).

If you need to build your Elm project with elm-make (Elm 0.18 and older), you can pin your webassets-elm package to version 0.1.7.

Basic usage

from webassets.filter import register_filter
from webassets_elm import Elm

register_filter(Elm)

Settings

Optionally as an evironment variable you can have:

  • ELM_BIN: alternative path to elm if it is not available globally (e.g. node_modules/.bin/elm).

  • ELM_OPTIMIZE: enable the Elm compiler optimization option. Recommended for production output.

  • ELM_DEBUG: enable the Elm compiler debug option.

Examples

Flask with flask-assets

from flask import Flask
from flask_assets import Bundle, Environment
from webassets.filter import register_filter
from webassets_elm import Elm

app = Flask(__name__)

register_filter(Elm)
assets = Environment(app)

elm_js = Bundle('elm/main.elm', filters=('elm',), output='app.js')
assets.register('elm_js', elm_js)

Django with django-assets

from django_assets import Bundle, register
from webassets.filter import register_filter
from webassets_elm import Elm

register_filter(Elm)

elm_js = Bundle('elm/main.elm', filters=('elm',), output='app.js')
register('elm_js', elm_js)

Contributing

Feel free to report an issue, open a pull request, or drop a line.

Don’t forget to write and run tests, and format code with Black:

python setup.py test
black .

Please note you need elm binary available to run tests, here you can find different ways to install Elm.

Metadata

Release files for webassets-elm 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for webassets-elm 0.2.1
File Size Uploaded
webassets-elm-0.2.1.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for webassets-elm 0.2.1
File Interpreter ABI Platform
webassets_elm-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.2 kB

Release files / webassets-elm-0.2.1.tar.gz

Download URL webassets-elm-0.2.1.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
eca2c366f2cd89497a1e2d28ba2828ebbc778d5073b5f1d1c7879a3f1f042f23
BLAKE2b-256 checksum
How to use checksums
74c4ed24a320d1d6a191646e6e301beb5f462624f3bcd3ae3a975f5235cad54a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

Release files / webassets_elm-0.2.1-py3-none-any.whl

Download URL webassets_elm-0.2.1-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b0e32c6c787203d3c573841055e9c435ba72d9fca54eab502e2e85438a01a86
BLAKE2b-256 checksum
How to use checksums
94e4f825235374bc638cd49329b2a678293a266d6e3b4f9f1f7e5e5bc1c3f5d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page