Skip to content

Instantly share code, notes, and snippets.

@erikhazzard
Created June 21, 2012 04:09
Show Gist options
  • Save erikhazzard/2963791 to your computer and use it in GitHub Desktop.
Save erikhazzard/2963791 to your computer and use it in GitHub Desktop.
less makefile example
CHECK=\033[32m✔\033[39m
HR= ==================================================
LESS_FILES = static/less/less_variables.less \
static/less/base.less \
static/less/layout.less \
less:
@echo "\n${HR}"
@echo "Combining Less Files"
cat $(LESS_FILES) > static/less/all.less
@echo "${CHECK} Done"
@echo "\n${HR}"
@echo "Compiling CSS"
@./node_modules/less/bin/lessc static/less/all.less static/css/style_all.css
@echo "Running Less compiler... ${CHECK} Done"
watchless:
#NOTE: Requires ruby and watchr
echo "Watching Less and Coffee files..."; \
watchr -e "watch('static/less/.*\.less') { system 'make' }"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment