Outils pour utilisateurs

Outils du site


devweb:less (lu 500 fois)

Différences

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

Lien vers cette vue comparative

Prochaine révision
Révision précédente
devweb:less [21-09-2013 21:56]
edmc73 créée
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 10: Ligne 17:
  
 # Download latest version of node.js\\ # Download latest version of node.js\\
-# please replace the url with the newest available version, which you can find here http://nodejs.org/#download+# please replace the url with the newest available version, which you can find here http://nodejs.org/download/
   wget http://nodejs.org/dist/node-v0.4.7.tar.gz   wget http://nodejs.org/dist/node-v0.4.7.tar.gz
  
Ligne 18: Ligne 25:
 # change working directory # change working directory
   cd node-v0.4.7   cd node-v0.4.7
- 
  
 # configure # configure
Ligne 30: Ligne 36:
  
  
-# go back to home +Installer less
-  cd ~+
  
 +  npm install -g less
 +  
 +<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.
  
-# download less +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: 
-  wget --no-check-certificate https://github.com/cloudhead/less.js/tarball/master+apt-get install libssl-dev</note>
  
 +===== Utilisation =====
  
-# extract +Command-line usage
-  tar xfvz cloudhead-less.js-v1.0-336-g853604a.tar.gz+
  
 +Once installed, you can invoke the compiler from the command-line, as such:
  
-  mv cloudhead-less.js-853604a lesscss +  $ lessc styles.less 
-  mv lesscss/ /usr/local/+This will output the compiled CSS to stdout, you may then redirect it to a file of your choice:
  
 +  $ lessc styles.less > styles.css
 +  
 +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.
  
-  cd /usr/local/bin/ +To see all the command line options run lessc without parameters.
-  ln -s ../lesscss/bin/lessc+
  
 +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";
  
-/******************** NOTES *****************/\\ 
-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. 
  
-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: 
-apt-get install libssl-dev 
  
 +https://github.com/madebysource/lesshat/blob/master/README.md
devweb/less.1379793361.txt.gz · Dernière modification: 21-09-2013 21:56 de edmc73