Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Making 'compile_sass' hook's comments/warning more helpful.

  • Loading branch information...
commit 7f0598a7edea14ac001e7ad5e7a614e00f1b34a7 1 parent 173c4b1
@robatron robatron authored
Showing with 9 additions and 3 deletions.
  1. +9 −3 wok/contrib/hooks.py
View
12 wok/contrib/hooks.py
@@ -70,9 +70,14 @@ def compile_sass(output_dir):
same directory as the Sass file with the same name and an extension of
.css. For example, foo.scss -> foo.css.
- Hook:
+ Serves as a 'site.output.post' wok hook, e.g., your __hooks__.py file might
+ look like this:
- site.output.post
+ from wok.contrib.hooks import compile_sass
+
+ hooks = {
+ 'site.output.post':[compile_sass]
+ }
Dependencies:
@@ -92,4 +97,5 @@ def compile_sass(output_dir):
try:
subprocess.call(['sass', sass_arg])
except OSError:
- logging.warning('[hook/compile_sass] Could not run SASS hook.')
+ logging.warning('[hook/compile_sass] Could not run SASS '\
+ + 'hook. (Is SASS installed?)')
Please sign in to comment.
Something went wrong with that request. Please try again.