Last active
August 29, 2015 14:06
-
-
Save timtan/d49a8b24785c1fe8dff9 to your computer and use it in GitHub Desktop.
A Simple Makefile to make you develop less happily
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Build Your Less with watch function | |
| // you need to do the following first | |
| // sudo pip install watchdog | |
| LESS_FILE=style/style.less | |
| TARGET=style/style.css | |
| INCLUDE=--include-path=dist-bootstrap/less | |
| less_command := lessc $(LESS_FILE) $(INCLUDE) $(TARGET) | |
| notification_detected := echo modification detected | |
| shell_command := $(notification_detected);$(less_command) | |
| watchmedo_option := shell-command --recursive --patterns="*.less" | |
| compile: | |
| $(less_command) | |
| watch: | |
| watchmedo $(watchmedo_option) --command='$(shell_command)' |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
less css didn't have watch mode.
to use the Makefile, you need to pip install watchdog