Commits

Dmitri Lebedev  committed f77a588

coffeescript settings

  • Participants
  • Parent commits ff7ff5b
  • Branches coffee-script

Comments (0)

Files changed (3)

 
 locale/*/LC_MESSAGES/django.po:
 
+# coffeescript dependency. Uncomment the following line to turn it on.
+# requires curl
+# Also set USE_COFFEE_SCRIPT=True in settings.py
 run: bin/coffee
 bin/coffee: bin/buildout
-	bin/buildout install node
+	bin/buildout install coffee

File buildout.cfg

 [buildout]
 # add local subrepos that have setup.py to develop eggs in 'develop =' section.
+# gp.recipe.node works only from the repo, not from pypi
 develop = culebron-hamlpy gp.recipe.node
 
 # hamlpy needs a patch that this subrepo has
 project = project
 
 
-[node]
+[coffee]
 recipe = gp.recipe.node
 npms =
     coffee-script

File project/settings.py

 #	'reversion',  # uncomment to use object versioning
 #	'tastypie',  # uncomment to use RESTful APIs
 	'compressor',  # for sass and js compressor
-#	'social_auth',  
+#	'social_auth',
 
 	# Uncomment the next line to enable the admin:
 	# 'django.contrib.admin',
 	('text/sass', 'bin/sass {infile} {outfile}'),
 )
 COMPILER_FORMATS = {
-    '.sass': {
-        'binary_path': 'bin/sass',
-        'arguments': '*.sass *.css'},
+	'.sass': {
+		'binary_path': 'bin/sass',
+		'arguments': '*.sass *.css',
+	},
 }
+
+USE_COFFEE_SCRIPT = False
+if USE_COFFEE_SCRIPT:
+	COMPRESS_PRECOMPILERS += (
+		('text/coffeescript', 'bin/coffee -s -p < {infile} > {outfile}'),
+	)
+	COMPILER_FORMATS.update({'.coffee': {
+			'binary_path': 'bin/coffee',
+			'arguments': '*.coffee *.js',
+		},
+	})