Skip to content

Commit 8b36650

Browse files
author
Elis Axelsson
committed
Added flag to specify import path to the compiler from script
1 parent a6540e1 commit 8b36650

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bin/pscss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ include __DIR__.'/../scss.inc.php';
88
use Leafo\ScssPhp\Compiler;
99
use Leafo\ScssPhp\Parser;
1010

11-
$opts = getopt('hvTf:', array('help', 'version'));
11+
$opts = getopt('hvTi:f:', array('help', 'version'));
1212

1313
function has() {
1414
global $opts;
@@ -34,6 +34,7 @@ Options include:
3434
-v, --version Print the version
3535
-f=format Set the output format (compressed, crunched, expanded, or nested)
3636
-T Dump formatted parse tree
37+
-i=path Set import path
3738
3839
EOT;
3940
exit($HELP);
@@ -59,6 +60,10 @@ if (has("T")) {
5960

6061
$scss = new Compiler();
6162

63+
if (has("i")) {
64+
$scss->addImportPath($opts["i"]);
65+
}
66+
6267
if (has("f")) {
6368
$scss->setFormatter('Leafo\\ScssPhp\\Formatter\\' . ucfirst($opts["f"]));
6469
}

0 commit comments

Comments
 (0)