Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
devweb:less [21-09-2013 21:59] edmc73 |
devweb:less [08-02-2015 22:29] (Version actuelle) edmc73 [Méthode la plus simple] |
||
---|---|---|---|
Ligne 4: | Ligne 4: | ||
===== Installation ===== | ===== Installation ===== | ||
+ | |||
+ | ==== Méthode la plus simple ==== | ||
+ | |||
+ | apt-get install node-less | ||
+ | |||
+ | |||
+ | ==== Méthode plus longue... ==== | ||
# être root | # être root | ||
Ligne 28: | Ligne 35: | ||
make install | make install | ||
- | # go back to home | ||
- | cd ~ | ||
- | # download | + | Installer |
- | wget --no-check-certificate https:// | + | |
- | # extract | + | npm install |
- | tar xfvz cloudhead-less.js-v1.0-336-g853604a.tar.gz | + | |
+ | <note tip>When you run "./ | ||
+ | You can run "apt-get install build-essential" | ||
- | mv cloudhead-less.js-853604a lesscss | + | If you get an error that no openSSL is not available you can either configure it without them (--without-ssl) or you can install libssl by running: |
- | mv lesscss/ /usr/local/ | + | apt-get install libssl-dev< |
- | cd / | + | ===== Utilisation ===== |
- | ln -s ../ | + | |
+ | Command-line usage | ||
+ | Once installed, you can invoke the compiler from the command-line, | ||
- | / | + | $ lessc styles.less |
- | When you run "./ | + | This will output the compiled CSS to stdout, you may then redirect it to a file of your choice: |
- | You can run " | + | |
- | If you get an error that no openSSL | + | $ lessc styles.less > styles.css |
- | apt-get install libssl-dev | + | |
+ | Pour minifier le code, il faut installer YUI Compressor | ||
+ | |||
+ | $ aptitude install yui-compressor | ||
+ | |||
+ | To output minified CSS, simply pass the **-x** option. | ||
+ | |||
+ | To see all the command line options run lessc without parameters. | ||
+ | |||
+ | Un petit script pour automatiser tout ça | ||
+ | |||
+ | <code bash> | ||
+ | # | ||
+ | cd `dirname $0` | ||
+ | lessc --yui-compress public/ | ||
+ | </ | ||
+ | ===== Mixins library ===== | ||
+ | |||
+ | http:// | ||
+ | |||
+ | To use:\\ | ||
+ | Download the " | ||
+ | Place it in the same folder with your other LESS files.\\ | ||
+ | Reference it at the top of your LESS stylesheets with:\\ | ||
+ | |||
+ | @import " | ||
+ | |||
+ | |||
+ | |||
+ | https:// |