Skip to content

Commit

Permalink
Merge branch 'release/0.7' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
miracle2k committed Apr 11, 2012
2 parents a30ef71 + 0757b32 commit ddaa680
Show file tree
Hide file tree
Showing 81 changed files with 4,884 additions and 1,145 deletions.
26 changes: 26 additions & 0 deletions .idea/codeStyleSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/webassets.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
language: python
python:
- 2.6
install: pip install tox
# List envs explicitly to skip PyPy
script: tox -e py27_django14,py27_django13,py27_django12,py27_django11,py26_django14,py26_django13,py26_django12,py26_django11,py25_django14,py25_django13,py25_django12,py25_django11,no-glob2,external-jsmin,external-rjsmin
notifications:
email:
- [email protected]
branches:
only:
- master

108 changes: 72 additions & 36 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
0.7 (2012-04-11)
The big new thing is an abstract "version" concept, which allows the
version of an asset, in form of a hash or timestamp, to be added the the
filename or appended to the URL. Manifest functionality has been added to
allow these versions to be used in production without accessing the source
files. This is also important for performance reasons.

In addition, some of the changes that have been made are:

- CoffeeScript: Support COFFEE_NO_BARE option (Maxim Bodyansky).
- UglifyJS filter: Now supports UGLIFYJS_EXTRA_ARGS setting (Bryan Chow).
- Various Sass filter improvements (partially by Simon Pantzare).
- Switched the less filter to the NodeJS implementation. The old Ruby
implementation can be used via the less_ruby filter.
- cssrewrite filter now works with Django's staticfiles, Flask's blueprints.
- Added filter that compiles Django templates.
- Added PyScss filter.
- Added Handlebars filter.
- Added DustJS filter.
- Added a datauri filter.
- Various fixes and improvements for JST filter.
- Works again on Windows (Jon Morton).
- Output directory is now auto-created if necessary.
- Fixed various issues where the updater did not pick up changes, mostly
when dependencies changed.
- CLI: Renamed the "rebuild command to "build". Now supports custom
output files. Now requires argparse or Python 2.7.
- Added a --no-cache option to the build command.
- YAMLLoader improvements: now supports custom options, recursive bundles
(Bradley Wright).
- Filters are now more powerful via the new open() and concat() methods.
- FilesystemCache uses md5 values again.
- Support Python 2.5 again.
- Support for Django 1.4 and ``CachedStaticFileStorage``.
- In django-assets, support a ``ASSETS_MODULES`` option.

0.6 (2011-10-03)
- The Django 1.3 staticfiles contrib app is now supported.
- Bundles may now contain URLs (as supported by urllib2).
Expand Down Expand Up @@ -26,48 +62,48 @@
default).

0.5 (2011-03-30)
- Added ``CSSPrefixer`` and ``CoffeeScript`` filters (by myfreeweb).
- Compass filter: support .scss compilation (by Olivier Poitrey).
- Compass filter: added plugin support (by Olivier Poitrey).
- Compass filter: properly support imports.
- YUI filters: Support for ``yuicompressor`` PyPI package (by
Mikhail Korobov).
- Django 1.3 compatibility improvements.
- YUI filter: properly deal with UTF-8 encoded files (by Olivier
Poitrey).
- Added Google Closure filter (by Mark Lee).
- ``django-assets``: Now also loads from an application-level
``assets.py`` file (by David Guaraglia).
- Minor bug fixes.
- Globbing support: Patterns may not be used when specifying
Bundle contents.
- Added ``CSSPrefixer`` and ``CoffeeScript`` filters (by myfreeweb).
- Compass filter: support .scss compilation (by Olivier Poitrey).
- Compass filter: added plugin support (by Olivier Poitrey).
- Compass filter: properly support imports.
- YUI filters: Support for ``yuicompressor`` PyPI package (by
Mikhail Korobov).
- Django 1.3 compatibility improvements.
- YUI filter: properly deal with UTF-8 encoded files (by Olivier
Poitrey).
- Added Google Closure filter (by Mark Lee).
- ``django-assets``: Now also loads from an application-level
``assets.py`` file (by David Guaraglia).
- Minor bug fixes.
- Globbing support: Patterns may not be used when specifying
Bundle contents.

0.4 (2010-08-21)
- Renamed project to ``webassets``, no longer Django specific;
instead, the Django app is an optional addon.
- With the change to ``webassets``, a bunch of new things are
included which now make sense, like loading from YAML files.
- Got rid of the ASSETS_AUTO_CREATE option.
- Renamed project to ``webassets``, no longer Django specific;
instead, the Django app is an optional addon.
- With the change to ``webassets``, a bunch of new things are
included which now make sense, like loading from YAML files.
- Got rid of the ASSETS_AUTO_CREATE option.

0.3 (unreleased)
- Fixed: YUI filter JAVA_HOME handling (Ian Langworth,
Asheesh Laroia).
- 1.2 compatibility.
- Don't apply cache busting to source files in debug mode.
- Fixed ASSETS_AUTO_CREATE behavior.
- Fixed: YUI filter JAVA_HOME handling (Ian Langworth,
Asheesh Laroia).
- 1.2 compatibility.
- Don't apply cache busting to source files in debug mode.
- Fixed ASSETS_AUTO_CREATE behavior.

0.2 (2009-12-08)
- Compatibility with Django >= 1.0.
- Added some actual documentation.
- Allow assets to be defined in code, through ``Bundles``.
- Improved, more powerful way to define filters.
- Support for Jinja2 templates; support for Coffin, if installed.
- New CleverCSS filter (thanks to Florian Schachter).
- New less filter.
- Various bug fixes.
- Compatibility with Django >= 1.0.
- Added some actual documentation.
- Allow assets to be defined in code, through ``Bundles``.
- Improved, more powerful way to define filters.
- Support for Jinja2 templates; support for Coffin, if installed.
- New CleverCSS filter (thanks to Florian Schachter).
- New less filter.
- Various bug fixes.

This release introduces some backwards-incompatible changes. See
the ``Upgrading`` page in the documentation for details.
This release introduces some backwards-incompatible changes. See
the ``Upgrading`` page in the documentation for details.

0.1 (2008-07-27)
Initial release.
Initial release.
5 changes: 4 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ recursive-exclude docs *.pyc
prune docs/_build

recursive-include tests *
recursive-exclude tests *.pyc
recursive-exclude tests *.pyc

recursive-include examples *
recursive-exclude examples *.pyc
20 changes: 17 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
Asset management application for Python web development - use it to
merge and compress your JavaScript and CSS files.

Documentation of development version: |travis|
http://webassets.readthedocs.org/

Since releases aren't exactly happening on a regular schedule, you are
encouraged to use the latest code. ``webassets`` is pretty well tested,
so as long as the build status icon above remains a reassuring green,
you shouldn't run into any trouble.

You can `download a tarball`__ of the development version, or
install it via ``pip install webassets==dev``.

__ http://github.com/miracle2k/webassets/tarball/master#egg=webassets-dev

.. |travis| image:: https://secure.travis-ci.org/miracle2k/webassets.png?branch=master
:target: http://travis-ci.org/miracle2k/webassets


Documentation of latest stable version:
http://elsdoerfer.name/docs/webassets/

Documentation of development version:
http://webassets.readthedocs.org/
25 changes: 7 additions & 18 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
There is currently no locking going during auto-rebuilds, that is multiple
requests could potentially cause multiple builds!

Add a switch to the rebuild() command to ignore the cache.

Should bundle names be namespacable, similar to Django urls? At the least,
we probably want to encourage a convention of prefixing your bundle names
with an id. Everything else would just intend to make this easier or more
Expand All @@ -16,9 +14,6 @@ Since running an external tool is not uncommon for a filter, the Filter
base class could support a helper function that simplifies the calls to
the subprocess module.

Automatically create (and delete, i.e. manage) symlinks to make the
ASSETS_EXPIRE="filename" option work without server rewrites.

Support functionality for applying a filter directly within a template,
i.e. pack inline scripts. On the other end, allow piping an assets
directly into the template. The latter is probably best using
Expand All @@ -43,9 +38,6 @@ server error.

Support asset deployment to services like Amazon S3.

Support more expiration/cache busting options (e.g. append hash, use hash
instead of filename, ...); Allow custom code as well.

Add support for Bundle subclasses to customize behavior on a
bundle-by-bundle basis:
- The merging of filtersets.
Expand All @@ -54,13 +46,6 @@ bundle-by-bundle basis:
Basically, all the settings should be customizable this way, with the
settings themselves only serving as a default.

Some filters, like the less filter, cannot work with an input stream,
but only with the source files directly. To work, they thus need to be
the first ones to be applied. There should be a way for filters to declare
that requirement and webassets to automatically validate it.
One possible option: Adding a new method besides input/output - say, "open()".
Only one such filter would be allowed to run.

I was never really happy with the debug=False approach to solving
the CSS compiler in debug mode problem. Maybe it should be up to
filters to decide if they need to run. There shouldn't really be
Expand All @@ -73,6 +58,10 @@ used, if we can somehow hack Jinja2 to ignore unknown tags.

The input filter step can be parallelised. Is this worth it?

Creating a custom CLI is too complex currently. It should be possible
to use an existing class which does all the parsing, only providing
an environment instance.
Currently, all files need to be within the media directory. It would be
nice to be able to include files from arbitrary paths. The problem with
this is the debug mode, where the files need to be served directly. For
this, webassets could support copying them to the media directory.

Get rid of the global parts. The shipped filters would be loaded globally,
but the filter registry would be maintained by the environment.
32 changes: 31 additions & 1 deletion docs/builtin_filters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Javascript compressors
``uglifyjs``
~~~~~~~~~~~~

.. automodule:: webassets.filter.uglifyjs
.. autoclass:: webassets.filter.uglifyjs.UglifyJSFilter


``jsmin``
Expand Down Expand Up @@ -91,6 +91,12 @@ CSS Compilers
.. autoclass:: webassets.filter.less.LessFilter


``less_ruby``
~~~~~~~~~~~~~

.. autoclass:: webassets.filter.less_ruby.LessFilter


.. _filters-sass:

``sass``
Expand All @@ -111,6 +117,12 @@ CSS Compilers
.. autoclass:: webassets.filter.compass.CompassFilter


``pyscss``
~~~~~~~~~~

.. autoclass:: webassets.filter.pyscss.PyScssFilter


Other
-----

Expand All @@ -122,12 +134,30 @@ Other
.. autoclass:: webassets.filter.cssrewrite.CSSRewriteFilter


``datauri``
~~~~~~~~~~~~~~

.. autoclass:: webassets.filter.datauri.CSSDataUriFilter


``jst``
~~~~~~~~~~~~~~

.. autoclass:: webassets.filter.jst.JSTFilter


``handlebars``
~~~~~~~~~~~~~~

.. automodule:: webassets.filter.handlebars


``dustjs``
~~~~~~~~~~

.. autoclass:: webassets.filter.dust.DustJSFilter


``cssprefixer``
~~~~~~~~~~~~~~~

Expand Down
4 changes: 3 additions & 1 deletion docs/bundles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ arguments:
applied in the order in which they are given.

* ``output`` - Name/path of the output file. All source files will be merged
and the result stored at this location.
and the result stored at this location. A ``%(version)s`` placeholder is
supported here, which will be replaced with the version of the file. See
:doc:`/expiring`.


Nested bundles
Expand Down
Loading

0 comments on commit ddaa680

Please sign in to comment.