Want to contribute? Great! First, read this page.
As a derivative of dart-sass
, you must sign the Google Individual Contributor
License Agreement (CLA).
-
PHP 5.6 or above
-
In this repository, run
composer install
. This will install all of thevendor/
dependencies.
ScssPhp2 follows the PHP Standards PSR-1 Basic Coding Standard, PSR-4 Autoloading Standard, PSR-12 Extended Coding Style Guide, and draft PSR-19 PHPDoc tags.
Aside from file and class naming conventions, the source code structures should be similar to facilitate ongoing maintenance. To aid in porting, a subset of the Dart SDK and packages also exists to emulate the platform.
However, there may be deviations from the above guidelines to address issues with performance, error handling, or testability.
Before you send a pull request, we recommend you run the following steps:
-
make phpcs
will run the code sniffer for PSR-12 -
make phpunit
will run unit tests and sass-spec compatibility tests
ScssPhp2 does not support the asynchronous mode of operation (at this time).
All source files in the project must start with an appropriate file header.
For files ported from dart-sass
:
<?php
/**
* @copyright 2020 Google Inc.
* @license https://opensource.org/licenses/MIT MIT
*/
namespace Sass;
For files ported from dart-lang
:
<?php
/**
* @copyright 2020 Dart project authors
* @license https://opensource.org/licenses/BSD-3-Clause BSD
*/
namespace DartLang;
For scssphp
specific support files:
<?php
/**
* @copyright 2020 Anthon Pang
* @license https://opensource.org/licenses/MIT MIT
*/
namespace ScssPhp;