Hacker News new | ask | show | jobs
by crucialfelix 4802 days ago
I'm going to try to throw together a blog post.

basically though, I've used requirejs for the js both for single page apps and for general js like plugins and galleries.

compass/sass for the css which does minification and concatenation already, and also ensures there is no illegal css

js is processed by requirejs into STATIC_DIR/r/

css is compiled into myproject/static/myproject/css and then uses django's staticfiles system to collect and deploy

grunt is what calls requirejs. it could also concat and minimize css but compass has already done it. it also has watch and does live reload so that my browser will reload the css and even the js when either of them are edited.

on my pages I use a tag:

{% vcss "nestseekers/css/front.css" %}

which renders a <link css tag with a ?v=HASH appended

and

{% r_url 'nestseekers/js/libs/dist/html5shiv.js' %}

for the js