Outils pour utilisateurs

Outils du site


devweb:less (lu 932 fois)

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
Dernière révision Les deux révisions suivantes
devweb:less [21-09-2013 21:59]
edmc73
devweb:less [03-02-2015 17:14]
edmc73 [CSS3]
Ligne 4: Ligne 4:
  
 ===== Installation ===== ===== Installation =====
 +
 +==== Méthode la plus simple ====
 +
 +  apt-get install python g++ make checkinstall
 +  src=$(mktemp -d) && cd $src
 +  wget -N http://nodejs.org/dist/node-latest.tar.gz
 +  tar xzvf node-latest.tar.gz && cd node-v*
 +  ./configure
 +  checkinstall -y --install=no --pkgversion 0.10.25  make -j$(($(nproc)+1)) install  # Replace with current version number.
 +  dpkg -i node_*
 +
 +Installez less
 +  npm install -g less
 +
 +Pour désinstaller 
 +  dpkg -r node
 +
 +
 +==== Méthode plus longue... ====
  
 # être root # être root
Ligne 28: Ligne 47:
   make install   make install
  
-# go back to home 
-  cd ~ 
  
-# download less +Installer less
-  wget --no-check-certificate https://github.com/cloudhead/less.js/tarball/master+
  
-# extract +  npm install -less 
-  tar xfvz cloudhead-less.js-v1.0-336-g853604a.tar.gz+   
 +<note tip>When you run "./configure" you might get an error that no g++,c++... compiler is available.\\ 
 +You can run "apt-get install build-essential" to solve this.
  
-  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</note>
  
-  cd /usr/local/bin/ +===== Utilisation =====
-  ln -s ../lesscss/bin/lessc+
  
 +Command-line usage
  
 +Once installed, you can invoke the compiler from the command-line, as such:
  
-/******************** NOTES *****************/\\ +  $ lessc styles.less 
-When you run "./configure" you might get an error that no g++,c++... compiler is available.\\ +This will output the compiled CSS to stdout, you may then redirect it to a file of your choice:
-You can run "apt-get install build-essential" to solve this.+
  
-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: +  $ 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. If you would like more involved minification, the YUI CSS Compressor is also available with the **--yui-compress** option. 
 + 
 +To see all the command line options run lessc without parameters. 
 + 
 +Un petit script pour automatiser tout ça 
 + 
 +<code bash> 
 +#!/bin/bash 
 +cd `dirname $0` 
 +lessc --yui-compress public/less/bootstrap.less > public/css/bootstrap.min.css 
 +</code> 
 +===== Mixins library ===== 
 + 
 +http://lesselements.com/ 
 + 
 +To use:\\ 
 +Download the "elements.less" file.\\ 
 +Place it in the same folder with your other LESS files.\\ 
 +Reference it at the top of your LESS stylesheets with:\\ 
 + 
 +  @import "elements.less"; 
 + 
 + 
 + 
 +https://github.com/madebysource/lesshat/blob/master/README.md
devweb/less.txt · Dernière modification: 08-02-2015 22:29 de edmc73