Last active
December 13, 2015 22:08
-
-
Save felipelavinz/4981894 to your computer and use it in GitHub Desktop.
Trigger automatic compilation for less files with lessc and inoticoming
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
# Instalar utilidades para agregar repositorios PPA | |
sudo apt-get install python-software-properties python g++ make | |
# En Quantal (12.10) podrías necesitar el paquete software-properties-common para usar add-apt-repository | |
sudo apt-get install software-properties-common | |
# Agregar repositorio de node.js | |
sudo add-apt-repository ppa:chris-lea/node.js | |
# Actualizar información de repositorios | |
sudo apt-get update | |
# Instalar node.js y npm (gestor de paquetes de node) | |
sudo apt-get install nodejs npm | |
# Instalar less como paquete de node.js | |
sudo npm install -g less |
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
# Instalar programa que monitorea cambios a los archivos | |
sudo apt-get install inoticoming |
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
# ejemplo 1: vigilar carpeta "less" por cambios en cualquier y compilar a css/style.css | |
# esto funciona porque "style.less" hace @import de todos los restantes archivos que se utilizan en la definición de estilos | |
# --foreground te permite ver cuándo se dispara el comando y los errores de compilación | |
inoticoming --foreground less/ lessc style.less css/style.css \; | |
# ejemplo 2: vigilar carpeta "less" por cambios en archivos que comienzan con nombre "style.css" y compilar a css/style.css | |
inoticoming --foreground less --prefix style.less lessc less/{} css/style.css \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment