Skip to content
SCSS compiler written in PHP
Branch: master
Clone or download
Cerdic Let's cheat a bit on expected ruby test that has some inconsistency a…
…bout empty directives #13 - allow to focus on real compiler mistakes
Latest commit 244994f Jun 26, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Missed another file for the PHP version check Jun 18, 2019
example
src #13 : do not display empty directives in final output, has this is t… Jun 25, 2019
tests Let's cheat a bit on expected ruby test that has some inconsistency a… Jun 25, 2019
.editorconfig add .editorconfig (per #353) Oct 14, 2015
.gitattributes ignore .editorconfig in git archives Oct 21, 2015
.gitignore Bug fix error thrown from strpos if needle (basePath) is empty and ig… Oct 23, 2018
.travis.yml looks like you need to ask for the 7.4snapshot version to get a PHP 7… Jun 17, 2019
LICENSE.md Change namespace and bump version to 1.0.0; DIVERGES FROM leafo/scssphp! Jun 5, 2019
Makefile redirect stderr for the sass-spec tests Jun 13, 2019
README.md Update badge poser Jun 5, 2019
composer.json Change namespace and bump version to 1.0.0; DIVERGES FROM leafo/scssphp! Jun 5, 2019
phpunit.xml.dist Remove deprecated "strict" option from phpunit.xml.dist Sep 10, 2015
scss.inc.php Change namespace and bump version to 1.0.0; DIVERGES FROM leafo/scssphp! Jun 5, 2019

README.md

scssphp

http://scssphp.github.io/scssphp

Build License

scssphp is a compiler for SCSS written in PHP.

Checkout the homepage, http://scssphp.github.io/scssphp, for directions on how to use.

Running Tests

scssphp uses PHPUnit for testing.

Run the following command from the root directory to run every test:

vendor/bin/phpunit tests

There are several tests in the tests/ directory:

  • ApiTest.php contains various unit tests that test the PHP interface.
  • ExceptionTest.php contains unit tests that test for exceptions thrown by the parser and compiler.
  • FailingTest.php contains tests reported in Github issues that demonstrate compatibility bugs.
  • InputTest.php compiles every .scss file in the tests/inputs directory then compares to the respective .css file in the tests/outputs directory.
  • ScssTest.php extracts (ruby) scss tests from the tests/scss_test.rb file.
  • ServerTest.php contains functional tests for the Server class.

When changing any of the tests in tests/inputs, the tests will most likely fail because the output has changed. Once you verify that the output is correct you can run the following command to rebuild all the tests:

BUILD=1 vendor/bin/phpunit tests

This will compile all the tests, and save results into tests/outputs.

To enable the scss compatibility tests:

TEST_SCSS_COMPAT=1 vendor/bin/phpunit tests

Coding Standard

scssphp source conforms to PSR2.

Run the following command from the root directory to check the code for "sniffs".

vendor/bin/phpcs --standard=PSR2 bin src tests
You can’t perform that action at this time.