Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scssphp to version 1.10.0 #228

Merged
merged 1 commit into from
Jun 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions scssphp/bin/pscss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use ScssPhp\ScssPhp\Parser;
use ScssPhp\ScssPhp\Version;

$style = null;
$loadPaths = null;
$loadPaths = [];
$dumpTree = false;
$inputFile = null;
$changeDir = false;
Expand All @@ -38,8 +38,8 @@ $embedSourceMap = false;
/**
* Parse argument
*
* @param integer $i
* @param array $options
* @param int $i
* @param string[] $options
*
* @return string|null
*/
Expand Down Expand Up @@ -148,7 +148,7 @@ EOT;
$value = parseArgument($i, array('-I', '--load-path'));

if (isset($value)) {
$loadPaths = $value;
$loadPaths[] = $value;
continue;
}

Expand Down Expand Up @@ -188,7 +188,7 @@ if ($dumpTree) {
$scss = new Compiler();

if ($loadPaths) {
$scss->setImportPaths(explode(PATH_SEPARATOR, $loadPaths));
$scss->setImportPaths($loadPaths);
}

if ($style) {
Expand Down
42 changes: 32 additions & 10 deletions scssphp/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,44 @@
"sass/sass-spec": "*",
"squizlabs/php_codesniffer": "~3.5",
"symfony/phpunit-bridge": "^5.1",
"thoughtbot/bourbon": "^7.0",
"twbs/bootstrap": "~5.0",
"twbs/bootstrap4": "4.6.0",
"twbs/bootstrap4": "4.6.1",
"zurb/foundation": "~6.5"
},
"repositories": [
{
"type": "package",
"package": {
"name": "sass/sass-spec",
"version": "2021.05.10",
"version": "2021.11.30",
"source": {
"type": "git",
"url": "https://github.com/sass/sass-spec.git",
"reference": "b9bf24a936528f333fb30ee59ca550c6da551c11"
"reference": "ee5b460ac84b1ce27b86e22c0252b4296444cf3a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sass/sass-spec/zipball/b9bf24a936528f333fb30ee59ca550c6da551c11",
"reference": "b9bf24a936528f333fb30ee59ca550c6da551c11",
"url": "https://api.github.com/repos/sass/sass-spec/zipball/ee5b460ac84b1ce27b86e22c0252b4296444cf3a",
"reference": "ee5b460ac84b1ce27b86e22c0252b4296444cf3a",
"shasum": ""
}
}
},
{
"type": "package",
"package": {
"name": "thoughtbot/bourbon",
"version": "v7.0.0",
"source": {
"type": "git",
"url": "https://github.com/thoughtbot/bourbon.git",
"reference": "fbe338ee6807e7f7aa996d82c8a16f248bb149b3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thoughtbot/bourbon/zipball/fbe338ee6807e7f7aa996d82c8a16f248bb149b3",
"reference": "fbe338ee6807e7f7aa996d82c8a16f248bb149b3",
"shasum": ""
}
}
Expand All @@ -67,23 +86,26 @@
"type": "package",
"package": {
"name": "twbs/bootstrap4",
"version": "v4.6.0",
"version": "v4.6.1",
"source": {
"type": "git",
"url": "https://github.com/twbs/bootstrap.git",
"reference": "6ffb0b48e455430f8a5359ed689ad64c1143fac2"
"reference": "043a03c95a2ad6738f85b65e53b9dbdfb03b8d10"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twbs/bootstrap/zipball/6ffb0b48e455430f8a5359ed689ad64c1143fac2",
"reference": "6ffb0b48e455430f8a5359ed689ad64c1143fac2",
"url": "https://api.github.com/repos/twbs/bootstrap/zipball/043a03c95a2ad6738f85b65e53b9dbdfb03b8d10",
"reference": "043a03c95a2ad6738f85b65e53b9dbdfb03b8d10",
"shasum": ""
}
}
}
],
"bin": ["bin/pscss"],
"config": {
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"bamarni/composer-bin-plugin": true
}
}
}
8 changes: 4 additions & 4 deletions scssphp/src/Base/Range.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ class Range
/**
* Initialize range
*
* @param integer|float $first
* @param integer|float $last
* @param int|float $first
* @param int|float $last
*/
public function __construct($first, $last)
{
Expand All @@ -46,9 +46,9 @@ public function __construct($first, $last)
/**
* Test for inclusion in range
*
* @param integer|float $value
* @param int|float $value
*
* @return boolean
* @return bool
*/
public function includes($value)
{
Expand Down
12 changes: 6 additions & 6 deletions scssphp/src/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
class Block
{
/**
* @var string
* @var string|null
*/
public $type;

/**
* @var \ScssPhp\ScssPhp\Block
* @var Block|null
*/
public $parent;

Expand All @@ -37,17 +37,17 @@ class Block
public $sourceName;

/**
* @var integer
* @var int
*/
public $sourceIndex;

/**
* @var integer
* @var int
*/
public $sourceLine;

/**
* @var integer
* @var int
*/
public $sourceColumn;

Expand All @@ -67,7 +67,7 @@ class Block
public $children;

/**
* @var \ScssPhp\ScssPhp\Block|null
* @var Block|null
*/
public $selfParent;
}
37 changes: 37 additions & 0 deletions scssphp/src/Block/AtRootBlock.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

/**
* SCSSPHP
*
* @copyright 2012-2020 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://scssphp.github.io/scssphp
*/

namespace ScssPhp\ScssPhp\Block;

use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Type;

/**
* @internal
*/
class AtRootBlock extends Block
{
/**
* @var array|null
*/
public $selector;

/**
* @var array|null
*/
public $with;

public function __construct()
{
$this->type = Type::T_AT_ROOT;
}
}
45 changes: 45 additions & 0 deletions scssphp/src/Block/CallableBlock.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

/**
* SCSSPHP
*
* @copyright 2012-2020 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://scssphp.github.io/scssphp
*/

namespace ScssPhp\ScssPhp\Block;

use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Compiler\Environment;

/**
* @internal
*/
class CallableBlock extends Block
{
/**
* @var string
*/
public $name;

/**
* @var array|null
*/
public $args;

/**
* @var Environment|null
*/
public $parentEnv;

/**
* @param string $type
*/
public function __construct($type)
{
$this->type = $type;
}
}
38 changes: 38 additions & 0 deletions scssphp/src/Block/ContentBlock.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

/**
* SCSSPHP
*
* @copyright 2012-2020 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://scssphp.github.io/scssphp
*/

namespace ScssPhp\ScssPhp\Block;

use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Compiler\Environment;
use ScssPhp\ScssPhp\Type;

/**
* @internal
*/
class ContentBlock extends Block
{
/**
* @var array|null
*/
public $child;

/**
* @var Environment|null
*/
public $scope;

public function __construct()
{
$this->type = Type::T_INCLUDE;
}
}
37 changes: 37 additions & 0 deletions scssphp/src/Block/DirectiveBlock.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

/**
* SCSSPHP
*
* @copyright 2012-2020 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://scssphp.github.io/scssphp
*/

namespace ScssPhp\ScssPhp\Block;

use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Type;

/**
* @internal
*/
class DirectiveBlock extends Block
{
/**
* @var string|array
*/
public $name;

/**
* @var string|array|null
*/
public $value;

public function __construct()
{
$this->type = Type::T_DIRECTIVE;
}
}
37 changes: 37 additions & 0 deletions scssphp/src/Block/EachBlock.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

/**
* SCSSPHP
*
* @copyright 2012-2020 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://scssphp.github.io/scssphp
*/

namespace ScssPhp\ScssPhp\Block;

use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Type;

/**
* @internal
*/
class EachBlock extends Block
{
/**
* @var string[]
*/
public $vars = [];

/**
* @var array
*/
public $list;

public function __construct()
{
$this->type = Type::T_EACH;
}
}