dir.by  
  Поиск  
Компьютер, программы
LESS file (using the compiler to get a CSS file)
 Конвертируем файл .LESS в файл .CSS (в командной строке выполним: "lessc 1.less 1.css") | node.js 
посмотрели 3822 раз
обновлено: 17 June 2020
Я буду использовать Node.js
So if you have not installed Node.js, then install Node.js ...
Шаг 1. В командной строке выполним: npm install -g less . Эта команда проинсталирует в windows системе less конвертер
Эта команда выполняется один раз за все время существования системы Windows на своем компьютере.
npm install -g less
Шаг 2. Создадим файл 1.less на диске d:/
  Файл 1.less
@grey: #CCCCCC;

a {
     background-color: @grey;
}

font {
     border-bottom: 1px solid @grey;
}
Шаг 3. Находясь в директории D:/ в командной строке выполним: lessc 1.less 1.css . Эта команда конвертирует файл 1.less в файл 1.css
  Command Prompt (Win Console)  
lessc 1.less 1.css
Результат
  CSS  
a {
     background-color: #CCCCCC;
}

font {
     border-bottom: 1px solid #CCCCCC;
}
 
← Previous topic
What is a LESS file?
 
Next topic →
Convert the folder(s) with . LESS files in . CSS files (on the command line, run: "lessc-each src/files_less dest/files_css") | node.js
 
Your feedback ... Comments ...
   
Your Name
Your comment (www links can only be added by a logged-in user)

  Объявления  
  Объявления  
 
What is a LESS file?
Convert a single . LESS file to the . CSS
Convert the . LESS file to the . CSS (at the command line, run: "lessc 1.less 1.css") | node.js
Convert the entire folder with . LESS files to . CSS
Convert the folder(s) with . LESS files in . CSS files (on the command line, run: "lessc-each src/files_less dest/files_css") | node.js

  Ваши вопросы присылайте по почте: info@dir.by