Skip to content

Commit

Permalink
README.md -> README.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
cuducos committed Jun 13, 2017
1 parent 3ba560a commit 86b24cd
Show file tree
Hide file tree
Showing 3 changed files with 139 additions and 119 deletions.
90 changes: 0 additions & 90 deletions README.md

This file was deleted.

110 changes: 110 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
Elm filter for webassets
########################

.. image:: https://img.shields.io/travis/cuducos/webassets-elm.svg?style=flat
:target: https://travis-ci.org/cuducos/webassets-elm
:alt: Travis CI

.. image:: https://img.shields.io/coveralls/cuducos/webassets-elm.svg?style=flat
:target: https://coveralls.io/github/cuducos/webassets-elm
:alt: Covearge

.. image:: https://landscape.io/github/cuducos/webassets-elm/master/landscape.svg?style=flat
:target: https://landscape.io/github/cuducos/webassets-elm/master
:alt: Code Health

Filter for compiling `Elm <http://elm-lang.org>`_ files using `webassets <http://webassets.readthedocs.org>`_.

.. image:: https://img.shields.io/pypi/status/webassets-elm.svg?style=flat
:target: https://pypi.python.org/pypi/webassets-elm
:alt: Status

.. image:: https://img.shields.io/pypi/v/webassets-elm.svg?style=flat
:target: https://pypi.python.org/pypi/webassets-elm
:alt: Latest release

.. image:: https://img.shields.io/pypi/pyversions/webassets-elm.svg?style=flat
:target: https://pypi.python.org/pypi/webassets-elm
:alt: Python versions

.. image:: https://img.shields.io/pypi/l/webassets-elm.svg?style=flat
:target: https://pypi.python.org/pypi/webassets-elm
:alt: License

Install
*******

::

pip install webassets-elm

Basic usage
***********

.. code:: python
from webassets.filter import register_filter
from webassets_elm import Elm
register_filter(Elm)
Settings
========

**Optionally** as an evironment variable you can have:

* `ELM_MAKE_BIN`: alternative path to `elm-make` if it is **not** available globally (e.g. `node_modules/.bin/elm-make`)

* `ELM_MAKE_CHANGE_DIRECTORY`: if set the filter will switch to `source_path` directory (where the main `.elm` is located) prior to compilation

Examples
========

Flask with `flask-assets <http://flask-assets.readthedocs.io/>`_
----------------------------------------------------------------

.. code:: python
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 <http://django-assets.readthedocs.org>`_
-------------------------------------------------------------------

.. code:: python
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 <http://github.com/cuducos/webassets-elm/issues>`_, `open a pull request <http://github.com/cuducos/webassets-elm/pulls>`_, or `drop a line <http://twitter.com/cuducos>`_.

Don't forget to write and run tests:

::

python setup.py test

You need `elm` binaries available to run tests. `Install Elm <http://elm-lang.org/install>`_ and then the required packages:

::

elm-package install
58 changes: 29 additions & 29 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
from setuptools import setup, find_packages

REPO_URL = 'https://github.com/cuducos/webassets-elm'
with open('README.rst') as readme:

setup(
author='Eduardo Cuducos',
author_email='cuducos@gmail.com',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Flask',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6'
],
description='Elm filter for webassets',
install_requires=['webassets'],
keywords=['elm', 'webassets', 'assets', 'flask', 'django'],
license='MIT',
long_description='Check `webassets-elm at GitHub <{}>`_.'.format(REPO_URL),
name='webassets-elm',
packages=find_packages(),
test_suite='nose.collector',
tests_require=['nose'],
url=REPO_URL,
version='0.1.7',
zip_safe=False
)
setup(
author='Eduardo Cuducos',
author_email='cuducos@gmail.com',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Flask',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6'
],
description='Elm filter for webassets',
install_requires=['webassets'],
keywords=['elm', 'webassets', 'assets', 'django', 'flask'],
license='MIT',
long_description=readme.read(),
name='webassets-elm',
packages=find_packages(),
test_suite='nose.collector',
tests_require=['nose'],
url='https://github.com/cuducos/webassets-elm',
version='0.1.7',
zip_safe=False
)

0 comments on commit 86b24cd

Please sign in to comment.