This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
=====================
django-grunted-assets
=====================

Goal
====

- Have css and js compressed and cache busted in production
- Have livereload work with css injection in development
- Have livereload work with coffee-script files and html templates
- Have node serve our staticfiles in development as it is way faster than
django's runserver
- Give the flexibility that compressor provides, linking arbitrary files in certain templates and locations

Where django-compressor falls short
===================================

- Slow compile and reload
- No css injection with livereload
- Not the tools that grunt provides (autoprefixer, uglify, etc)
- Inlining assets

How it works
============

1. Put your static where you normally do, e.g. in a top level 'static' or
'assets' dir, or in the 'static' dir in your app.
2. Configure the paths in your gruntfile.
3. Add ``{% load grunted_assets %}`` to your (base) template and link the
assets you want to load with: ``{% link_asset 'script.js' %}``
4. Run grunt (see below).
5. Run ``django-admin.py collectstatic``

The ``link_asset`` template tag (or the ``inline_asset`` tag), searches for the
files in either ``.tmp`` (development) or ``dist`` (production) within
``STATIC_ROOT``.

The argument you pass to ``link_asset`` of ``inline_asset`` is treated as a regex. A
simple ``main.css`` therefore works, but using ``.*main\.js`` for example, you can
also match files processed with something like
``grunt-rev<https: www.npmjs.com="" package="" grunt-rev="">``_.

Development
-----------

In development (``grunt`` or ``grunt develop``), grunt compiles sass and coffee-
script to a ``.tmp`` dir inside 'static'. These files get served by node. No
cache busting here.

All static will be served by ``connect`` on ``localhost:8001``, so set
``STATIC_URL='http://localhost:8001``

Production
----------

Run ``grunt dist`` and check the ``dist`` folder into source control. This will
concat, minify etc. all your js and css into 'main.css' and 'main.js' as you
specify in your gruntfile.

On the server run ``django-admin.py collectstatic`` to have all static files
collected to the proper place.
Release History

Release History

0.2.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_grunted_assets-0.2.1-py2.py3-none-any.whl (6.1 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Jan 16, 2015
django-grunted-assets-0.2.1.tar.gz (3.7 kB) Copy SHA256 Checksum SHA256 Source Jan 16, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting