Skip to content

Instantly share code, notes, and snippets.

COMPRESS_CSS_FILTERS = ['compressor.filters.yuglify.YUglifyCSSFilter']
COMPRESS_JS_FILTERS = ['compressor.filters.yuglify.YUglifyJSFilter']
pip install http://github.com/django-compressor/django-compressor/tarball/develop
# myapp/signals/handlers.py
from django.dispatch import receiver
from .signals import example_signal
@receiver(example_signal)
def example_signal_handler(sender, **kwargs):
print kwargs['arg1']
print kwargs['arg2']
# myapp/apps.py
from django.apps import AppConfig
class MyAppConfig(AppConfig):
name = 'myapp'
verbose_name = 'My App'
def ready(self):
# myapp/signals/signals.py
from django.dispatch import Signal
example_signal = Signal(providing_args=['arg1', 'arg2'])
# myapp/__init__.py
default_app_config = 'myapp.apps.MyAppConfig'
{
"name": "grunt-sass-coffeescript",
"version": "0.1.0",
"repository": "",
"devDependencies": {
"grunt": "~0.4.2",
"grunt-contrib-sass": "~0.7.2",
"grunt-contrib-coffee": "~0.10.1",
"grunt-contrib-watch": "~0.5.3",
"coffee-script": "~1.7.1"
module.exports = (grunt) ->
# configuration
grunt.initConfig
# grunt sass
sass:
compile:
options:
style: 'expanded'
*.html
Gruntfile.coffee
package.json
/lib
/coffee
*.coffee
/css
*.css
/js
*.js
# install sass
sudo gem install sass
# install grunt cli globally
sudo npm install -g grunt-cli
# note - switch to project directory where Gruntfile.coffee and package.json are sitting
# install dependencies
npm install