리눅스 Less.php 설치

리눅스 Less.php 설치
"oyejorge/less.php"

1 사전 작업[ | ]

2 composer로 설치[ | ]

root@zetawiki:~# cd /usr/share/php
root@zetawiki:/usr/share/php# rm -f composer.*
root@zetawiki:/usr/share/php# composer require "oyejorge/less.php"
Using version v1.7.0.10 for oyejorge/less.php
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing oyejorge/less.php (v1.7.0.10)
    Downloading: 100%         

Writing lock file
Generating autoload files
  • 폴더명 변경
root@zetawiki:/usr/share/php# mv vendor/ less.php
root@zetawiki:/usr/share/php#

3 테스트[ | ]

root@zetawiki:/usr/share/php# cd
root@zetawiki:~# vi less_php_test.php
<?php
include 'less.php/autoload.php';
$parser = new Less_Parser();
$parser->parse( '@color: #4D926F; #header { color: @color; } h2 { color: @color; }' );
echo $parser->getCss();
root@zetawiki:~# php less_php_test.php 
#header {
  color: #4d926f;
}
h2 {
  color: #4d926f;
}

4 같이 보기[ | ]

5 주석[ | ]

  1. 없으면 mkdir /usr/share/php로 만들자.
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}