Update composer dependencies

This commit is contained in:
Kijin Sung 2016-03-22 11:26:00 +09:00
parent 06f5151f8f
commit 365d7cdba9
58 changed files with 1245 additions and 5987 deletions

View file

@ -12,8 +12,8 @@
error_reporting(E_ALL);
if (version_compare(PHP_VERSION, '5.3') < 0) {
die('Requires PHP 5.3 or above');
if (version_compare(PHP_VERSION, '5.4') < 0) {
die('Requires PHP 5.4 or above');
}
include __DIR__ . '/../scss.inc.php';
@ -30,6 +30,8 @@ $inputFile = null;
$changeDir = false;
$debugInfo = false;
$lineNumbers = false;
$ignoreErrors = false;
$encoding = false;
/**
* Parse argument
@ -67,14 +69,16 @@ Usage: $exe [options] [input-file]
Options include:
--debug-info Annotate selectors with CSS referring to the source file and line number
-h, --help Show this message
-f=format Set the output format (compact, compressed, crunched, expanded, or nested)
-i=path Set import path
--line-numbers Annotate selectors with comments referring to the source file and line number
-p=precision Set decimal number precision (default 5)
-T Dump formatted parse tree
-v, --version Print the version
-h, --help Show this message
--continue-on-error Continue compilation (as best as possible) when error encountered
--debug-info Annotate selectors with CSS referring to the source file and line number
-f=format Set the output format (compact, compressed, crunched, expanded, or nested)
-i=path Set import path
--iso8859-1 Use iso8859-1 encoding instead of utf-8 (default utf-8)
--line-numbers Annotate selectors with comments referring to the source file and line number
-p=precision Set decimal number precision (default 5)
-T Dump formatted parse tree
-v, --version Print the version
EOT;
exit($HELP);
@ -84,11 +88,21 @@ EOT;
exit(Version::VERSION . "\n");
}
if ($argv[$i] === '--continue-on-error') {
$ignoreErrors = true;
continue;
}
if ($argv[$i] === '--debug-info') {
$debugInfo = true;
continue;
}
if ($argv[$i] === '--iso8859-1') {
$encoding = 'iso8859-1';
continue;
}
if ($argv[$i] === '--line-numbers' || $argv[$i] === '--line-comments') {
$lineNumbers = true;
continue;
@ -163,6 +177,10 @@ if ($lineNumbers && $inputFile) {
$scss->setLineNumberStyle(Compiler::LINE_COMMENTS);
}
if ($ignoreErrors) {
$scss->setIgnoreErrors($ignoreErrors);
}
if ($loadPaths) {
$scss->setImportPaths(explode(PATH_SEPARATOR, $loadPaths));
}
@ -175,6 +193,10 @@ if ($style) {
$scss->setFormatter('Leafo\\ScssPhp\\Formatter\\' . ucfirst($style));
}
if ($encoding) {
$scss->setEncoding($encoding);
}
echo $scss->compile($data, $inputFile);
if ($changeDir) {