liqd/adhocracy — pull request #504 by xi (2013-07-23 14:52:18+00:00)
Title: compile instance stylesheets

tl;dr: I changed a bash script and I'm not sure if the way I did it is a good idea.

The SASS compiler has three modes: `update` (default; compile once), `watch` (watch the files and compile on every change) and `check` (do not compile; just check if the code is valid). For some reason the compiler will throw an error if one tries to compile a directory (all .scss files from a directory not starting with an underscore) without a mode specified. When trying with `--update` it works fine.

Our wrapper script `compile_stylesheet` will forward any command line arguments to the sass compiler. I use that to use the `watch` mode on a regular basis. This works because in the wrapper script a single file is specified and no mode is given.

To compile instance stylesheets as implemented in #475 we now want to compile the whole `static_src/stylesheets` directory. As discussed before this is not trivial without loosing the `--watch` mode. I wrote something but I am not sure if it is the best option. So instead of committing directly I decided to create this pull request and ask for your opinion.