diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..737248b --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +bin/ +var/ +vendor/ diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..80bc0c2 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,22 @@ +language: php +# +#sudo: false +# +#cache: +# directories: +# - $HOME/.composer/cache/files +# +#matrix: +# include: +## - php: 5.6 +# - php: 7.0 +# - php: hhvm +# +#before_script: +# - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi; +# - composer update $COMPOSER_FLAGS +# +#script: phpunit --coverage-text --coverage-clover=coverage.clover +# +#after_script: +# - wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover diff --git a/LICENSE b/LICENSE index ed34fb5..43d6454 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 learn-symfony +Copyright (c) 2016 Eugene Matvejev Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/ScriptHandler.php b/ScriptHandler.php new file mode 100644 index 0000000..e9da04a --- /dev/null +++ b/ScriptHandler.php @@ -0,0 +1,46 @@ +getComposer()->getPackage()->getExtra(); + + if (!isset($extras['css-compiler'])) { + throw new \InvalidArgumentException('The parameter handler needs to be configured through the extra.css-compiler setting.'); + } + + $configs = $extras['css-compiler']; + + if (!is_array($configs)) { + throw new \InvalidArgumentException('The extra.css-compiler setting must be an array of a configuration objects.'); + } + + if (array_keys($configs) !== range(0, count($configs) - 1)) { + $configs = [$configs]; + } + + $processor = new Processor($event->getIO()); + + exec('rm -rf ' . __DIR__ . '/var/*'); + + foreach ($configs as $config) { + if (!is_array($config)) { + throw new \InvalidArgumentException('The extra.css-compiler should contain only configuration objects.'); + } + + foreach ($config['input'] as $item => $value) { + $processor->attachFiles(__DIR__ . "/{$value}", __DIR__ . "/{$config['output']}"); + } + + $processor->processFiles($config['format'] ?? 'compact'); + } + + $processor->saveOutput(); + } +} diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..e29f3f5 --- /dev/null +++ b/composer.json @@ -0,0 +1,71 @@ +{ + "name": "eugenematvejev/css_compiler", + "description": "compiles css assets from sass or less on composer events", + "type": "lib", + "license": "MIT", + "authors": [ + { + "name": "Eugene Matvejev", + "email": "eugene.matvejev@gmail.com" + } + ], + "autoload": { + "psr-4": { + "EM\\CssCompiler\\Handler\\": "", + "EM\\CssCompiler\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "EM\\Tests\\CssCompiler\\": "tests/" + } + }, + "require": { + "php": ">= 7.0.4", + "leafo/lessphp": "^0.5", + "leafo/scssphp": "0.6.3 as dev-master", + "leafo/scssphp-compass": "dev-master" + }, + "require-dev": { + "composer/composer": "^1.1", + "phpunit/phpunit": "^5.4" + }, + "minimum-stability": "dev", + "scripts": { + "post-update-cmd": "@custom-events", + "post-install-cmd": "@custom-events", + "custom-events": [ + "EM\\CssCompiler\\Handler\\ScriptHandler::compileCSS" + ] + }, + "config": { + "bin-dir": "bin/" + }, + "extra": { + "css-compiler": [ + { + "format": "compact", + "force": true, + "input": [ + "tests/shared-fixtures/scss" + ], + "output": "var/cache/assets/scss.css" + }, + { + "format": "compact", + "force": true, + "input": [ + "tests/shared-fixtures/sass" + ], + "output": "var/cache/assets/sass.css" + }, + { + "format": "compact", + "input": [ + "tests/shared-fixtures/compass/app.scss" + ], + "output": "var/cache/assets/compass.css" + } + ] + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..b020db3 --- /dev/null +++ b/composer.lock @@ -0,0 +1,2228 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "hash": "d1a7baf6a2e77ce3f3bd51a643a57a2c", + "content-hash": "09dd85e4947a1485d5d837666963862e", + "packages": [ + { + "name": "doctrine/instantiator", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "416fb8ad1d095a87f1d21bc40711843cd122fd4a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/416fb8ad1d095a87f1d21bc40711843cd122fd4a", + "reference": "416fb8ad1d095a87f1d21bc40711843cd122fd4a", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2016-03-31 10:24:22" + }, + { + "name": "leafo/lessphp", + "version": "v0.5.0", + "source": { + "type": "git", + "url": "https://github.com/leafo/lessphp.git", + "reference": "0f5a7f5545d2bcf4e9fad9a228c8ad89cc9aa283" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/leafo/lessphp/zipball/0f5a7f5545d2bcf4e9fad9a228c8ad89cc9aa283", + "reference": "0f5a7f5545d2bcf4e9fad9a228c8ad89cc9aa283", + "shasum": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "lessc.inc.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT", + "GPL-3.0" + ], + "authors": [ + { + "name": "Leaf Corcoran", + "email": "leafot@gmail.com", + "homepage": "http://leafo.net" + } + ], + "description": "lessphp is a compiler for LESS written in PHP.", + "homepage": "http://leafo.net/lessphp/", + "time": "2014-11-24 18:39:20" + }, + { + "name": "leafo/scssphp", + "version": "v0.6.3", + "source": { + "type": "git", + "url": "https://github.com/leafo/scssphp.git", + "reference": "a27edad3d16635a222d7204706572e24c338aa17" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/leafo/scssphp/zipball/a27edad3d16635a222d7204706572e24c338aa17", + "reference": "a27edad3d16635a222d7204706572e24c338aa17", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "kherge/box": "~2.5", + "phpunit/phpunit": "~3.7", + "squizlabs/php_codesniffer": "~2.5" + }, + "bin": [ + "bin/pscss" + ], + "type": "library", + "autoload": { + "psr-4": { + "Leafo\\ScssPhp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Leaf Corcoran", + "email": "leafot@gmail.com", + "homepage": "http://leafo.net" + } + ], + "description": "scssphp is a compiler for SCSS written in PHP.", + "homepage": "http://leafo.github.io/scssphp/", + "keywords": [ + "css", + "less", + "sass", + "scss", + "stylesheet" + ], + "time": "2016-01-15 02:50:06" + }, + { + "name": "leafo/scssphp-compass", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/leafo/scssphp-compass.git", + "reference": "f1631ddb17731326863954d99b39694f0bbed6ec" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/leafo/scssphp-compass/zipball/f1631ddb17731326863954d99b39694f0bbed6ec", + "reference": "f1631ddb17731326863954d99b39694f0bbed6ec", + "shasum": "" + }, + "require": { + "leafo/scssphp": "dev-master" + }, + "type": "library", + "autoload": { + "classmap": [ + "compass.inc.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "authors": [ + { + "name": "Leaf Corcoran", + "email": "leafot@gmail.com", + "homepage": "http://leafo.net" + } + ], + "description": "Compass for scssphp", + "homepage": "http://leafo.net/scssphp/", + "time": "2012-08-02 02:04:32" + }, + { + "name": "myclabs/deep-copy", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "a8773992b362b58498eed24bf85005f363c34771" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/a8773992b362b58498eed24bf85005f363c34771", + "reference": "a8773992b362b58498eed24bf85005f363c34771", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "doctrine/collections": "1.*", + "phpunit/phpunit": "~4.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "homepage": "https://github.com/myclabs/DeepCopy", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2015-11-20 12:04:31" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2015-12-27 11:43:31" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "45ada3e3fd09789fbfbd6d65b3f0901f0030dc61" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/45ada3e3fd09789fbfbd6d65b3f0901f0030dc61", + "reference": "45ada3e3fd09789fbfbd6d65b3f0901f0030dc61", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0@dev", + "phpdocumentor/type-resolver": "^0.1.5", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2016-06-06 06:44:13" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.1.8", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "9891754231e55d42f0d16988ffb799af39f31a12" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9891754231e55d42f0d16988ffb799af39f31a12", + "reference": "9891754231e55d42f0d16988ffb799af39f31a12", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "time": "2016-03-28 10:02:29" + }, + { + "name": "phpspec/prophecy", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "58a8137754bc24b25740d4281399a4a3596058e0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0", + "reference": "58a8137754bc24b25740d4281399a4a3596058e0", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "sebastian/comparator": "^1.1", + "sebastian/recursion-context": "^1.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2016-06-07 08:13:47" + }, + { + "name": "phpunit/php-code-coverage", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "900370c81280cc0d942ffbc5912d80464eaee7e9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/900370c81280cc0d942ffbc5912d80464eaee7e9", + "reference": "900370c81280cc0d942ffbc5912d80464eaee7e9", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "^1.4.2", + "sebastian/code-unit-reverse-lookup": "~1.0", + "sebastian/environment": "^1.3.2", + "sebastian/version": "~1.0|~2.0" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "^5.4" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.4.0", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2016-06-03 05:03:56" + }, + { + "name": "phpunit/php-file-iterator", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2015-06-21 13:08:43" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21 13:50:34" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4|~5" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2016-05-12 18:03:57" + }, + { + "name": "phpunit/php-token-stream", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "cab6c6fefee93d7b7c3a01292a0fe0884ea66644" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/cab6c6fefee93d7b7c3a01292a0fe0884ea66644", + "reference": "cab6c6fefee93d7b7c3a01292a0fe0884ea66644", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2015-09-23 14:46:55" + }, + { + "name": "phpunit/phpunit", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "05cfedb45c3d00244eb9c062cd34d71f1de8c2e1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/05cfedb45c3d00244eb9c062cd34d71f1de8c2e1", + "reference": "05cfedb45c3d00244eb9c062cd34d71f1de8c2e1", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "myclabs/deep-copy": "~1.3", + "php": "^5.6 || ^7.0", + "phpspec/prophecy": "^1.3.1", + "phpunit/php-code-coverage": "^4.0", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "^3.2", + "sebastian/comparator": "~1.1", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.3", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/object-enumerator": "~1.0", + "sebastian/resource-operations": "~1.0", + "sebastian/version": "~1.0|~2.0", + "symfony/yaml": "~2.1|~3.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.5.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2016-06-06 11:18:52" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "0dc8fd8e87e0366c22b6c25d1f43c4e2e66847b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/0dc8fd8e87e0366c22b6c25d1f43c4e2e66847b3", + "reference": "0dc8fd8e87e0366c22b6c25d1f43c4e2e66847b3", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.6 || ^7.0", + "phpunit/php-text-template": "^1.2", + "sebastian/exporter": "^1.2" + }, + "conflict": { + "phpunit/phpunit": "<5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2016-06-04 05:52:19" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe", + "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2016-02-13 06:45:14" + }, + { + "name": "sebastian/comparator", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2015-07-26 15:48:44" + }, + { + "name": "sebastian/diff", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2015-12-08 07:14:41" + }, + { + "name": "sebastian/environment", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716", + "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2016-05-17 03:18:57" + }, + { + "name": "sebastian/exporter", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "f88f8936517d54ae6d589166810877fb2015d0a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/f88f8936517d54ae6d589166810877fb2015d0a2", + "reference": "f88f8936517d54ae6d589166810877fb2015d0a2", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2015-08-09 04:23:41" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2015-10-12 03:26:01" + }, + { + "name": "sebastian/object-enumerator", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "d4ca2fb70344987502567bc50081c03e6192fb26" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/d4ca2fb70344987502567bc50081c03e6192fb26", + "reference": "d4ca2fb70344987502567bc50081c03e6192fb26", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2016-01-28 13:25:10" + }, + { + "name": "sebastian/recursion-context", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "7ff5b1b3dcc55b8ab8ae61ef99d4730940856ee7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/7ff5b1b3dcc55b8ab8ae61ef99d4730940856ee7", + "reference": "7ff5b1b3dcc55b8ab8ae61ef99d4730940856ee7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2016-01-28 05:39:29" + }, + { + "name": "sebastian/resource-operations", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28 20:34:47" + }, + { + "name": "sebastian/version", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", + "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2016-02-04 12:56:52" + }, + { + "name": "symfony/yaml", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "3efdbaf135e2cefe060be6cfda516964827104ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/3efdbaf135e2cefe060be6cfda516964827104ac", + "reference": "3efdbaf135e2cefe060be6cfda516964827104ac", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2016-06-06 11:53:30" + }, + { + "name": "webmozart/assert", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "3a8e045064f294992a13966b6c892fb9d64853a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/3a8e045064f294992a13966b6c892fb9d64853a3", + "reference": "3a8e045064f294992a13966b6c892fb9d64853a3", + "shasum": "" + }, + "require": { + "php": "^5.3.3|^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2016-03-04 13:27:44" + } + ], + "packages-dev": [ + { + "name": "composer/ca-bundle", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/composer/ca-bundle.git", + "reference": "72a4e3cf6011f2083ec4a44213dbdf13bcf86297" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/72a4e3cf6011f2083ec4a44213dbdf13bcf86297", + "reference": "72a4e3cf6011f2083ec4a44213dbdf13bcf86297", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "ext-pcre": "*", + "php": "^5.3.2 || ^7.0" + }, + "require-dev": { + "symfony/process": "^2.5 || ^3.0" + }, + "suggest": { + "symfony/process": "This is necessary to reliably check whether openssl_x509_parse is vulnerable on older php versions, but can be ignored on PHP 5.5.6+" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\CaBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "keywords": [ + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" + ], + "time": "2016-05-12 13:34:15" + }, + { + "name": "composer/composer", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/composer/composer.git", + "reference": "08ef916beded8c738be11acc4f463c450e277d64" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/composer/zipball/08ef916beded8c738be11acc4f463c450e277d64", + "reference": "08ef916beded8c738be11acc4f463c450e277d64", + "shasum": "" + }, + "require": { + "composer/ca-bundle": "^1.0", + "composer/semver": "^1.0", + "composer/spdx-licenses": "^1.0", + "justinrainbow/json-schema": "^1.6 || ^2.0", + "php": "^5.3.2 || ^7.0", + "psr/log": "^1.0", + "seld/cli-prompt": "^1.0", + "seld/jsonlint": "^1.4", + "seld/phar-utils": "^1.0", + "symfony/console": "^2.5 || ^3.0", + "symfony/filesystem": "^2.5 || ^3.0", + "symfony/finder": "^2.2 || ^3.0", + "symfony/process": "^2.1 || ^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5 || ^5.0.5", + "phpunit/phpunit-mock-objects": "^2.3 || ^3.0" + }, + "suggest": { + "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", + "ext-zip": "Enabling the zip extension allows you to unzip archives", + "ext-zlib": "Allow gzip compression of HTTP requests" + }, + "bin": [ + "bin/composer" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\": "src/Composer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Composer helps you declare, manage and install dependencies of PHP projects, ensuring you have the right stack everywhere.", + "homepage": "https://getcomposer.org/", + "keywords": [ + "autoload", + "dependency", + "package" + ], + "time": "2016-06-06 10:22:06" + }, + { + "name": "composer/semver", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "03c9de5aa25e7672c4ad251eeaba0c47a06c8b98" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/03c9de5aa25e7672c4ad251eeaba0c47a06c8b98", + "reference": "03c9de5aa25e7672c4ad251eeaba0c47a06c8b98", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5 || ^5.0.5", + "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "time": "2016-06-02 09:04:51" + }, + { + "name": "composer/spdx-licenses", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/composer/spdx-licenses.git", + "reference": "b78fd88b09e6101096ad7029f510bf9cae8a8a2e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/b78fd88b09e6101096ad7029f510bf9cae8a8a2e", + "reference": "b78fd88b09e6101096ad7029f510bf9cae8a8a2e", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5 || ^5.0.5", + "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Spdx\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "SPDX licenses list and validation library.", + "keywords": [ + "license", + "spdx", + "validator" + ], + "time": "2016-05-04 12:35:11" + }, + { + "name": "justinrainbow/json-schema", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "6b2a33e6a768f96bdc2ead5600af0822eed17d67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/6b2a33e6a768f96bdc2ead5600af0822eed17d67", + "reference": "6b2a33e6a768f96bdc2ead5600af0822eed17d67", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "json-schema/json-schema-test-suite": "1.2.0", + "phpdocumentor/phpdocumentor": "~2", + "phpunit/phpunit": "^4.8.22" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "time": "2016-06-02 10:59:52" + }, + { + "name": "psr/log", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d8e60a5619fff77f9669da8997697443ef1a1d7e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d8e60a5619fff77f9669da8997697443ef1a1d7e", + "reference": "d8e60a5619fff77f9669da8997697443ef1a1d7e", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2016-01-06 21:40:42" + }, + { + "name": "seld/cli-prompt", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/cli-prompt.git", + "reference": "8cbe10923cae5bcd7c5a713f6703fc4727c8c1b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/cli-prompt/zipball/8cbe10923cae5bcd7c5a713f6703fc4727c8c1b4", + "reference": "8cbe10923cae5bcd7c5a713f6703fc4727c8c1b4", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Seld\\CliPrompt\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "Allows you to prompt for user input on the command line, and optionally hide the characters they type", + "keywords": [ + "cli", + "console", + "hidden", + "input", + "prompt" + ], + "time": "2016-04-18 09:31:41" + }, + { + "name": "seld/jsonlint", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/jsonlint.git", + "reference": "66834d3e3566bb5798db7294619388786ae99394" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/66834d3e3566bb5798db7294619388786ae99394", + "reference": "66834d3e3566bb5798db7294619388786ae99394", + "shasum": "" + }, + "require": { + "php": "^5.3 || ^7.0" + }, + "bin": [ + "bin/jsonlint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Seld\\JsonLint\\": "src/Seld/JsonLint/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "JSON Linter", + "keywords": [ + "json", + "linter", + "parser", + "validator" + ], + "time": "2015-11-21 02:21:41" + }, + { + "name": "seld/phar-utils", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/phar-utils.git", + "reference": "7009b5139491975ef6486545a39f3e6dad5ac30a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/7009b5139491975ef6486545a39f3e6dad5ac30a", + "reference": "7009b5139491975ef6486545a39f3e6dad5ac30a", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Seld\\PharUtils\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "PHAR file format utilities, for when PHP phars you up", + "keywords": [ + "phra" + ], + "time": "2015-10-13 18:44:15" + }, + { + "name": "symfony/console", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "28a2b0787182f4fd1f19c7599b6c2c95296ae616" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/28a2b0787182f4fd1f19c7599b6c2c95296ae616", + "reference": "28a2b0787182f4fd1f19c7599b6c2c95296ae616", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2016-06-06 15:09:02" + }, + { + "name": "symfony/filesystem", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "ae26c574678c9494f3a6fdbd790ff26f8b8846c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/ae26c574678c9494f3a6fdbd790ff26f8b8846c0", + "reference": "ae26c574678c9494f3a6fdbd790ff26f8b8846c0", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2016-05-13 18:13:23" + }, + { + "name": "symfony/finder", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "4a4ef9f7c26c095372c81d7412cf2c0f086783e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/4a4ef9f7c26c095372c81d7412cf2c0f086783e2", + "reference": "4a4ef9f7c26c095372c81d7412cf2c0f086783e2", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2016-05-13 18:13:23" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "67f0d2b927796648c5c38cedb7a2c8f1cf14e7dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/67f0d2b927796648c5c38cedb7a2c8f1cf14e7dc", + "reference": "67f0d2b927796648c5c38cedb7a2c8f1cf14e7dc", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2016-05-26 01:13:28" + }, + { + "name": "symfony/process", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "d9b69039bee46f0402f2ff67c0ee1fb55b655108" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/d9b69039bee46f0402f2ff67c0ee1fb55b655108", + "reference": "d9b69039bee46f0402f2ff67c0ee1fb55b655108", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "time": "2016-06-06 11:53:30" + } + ], + "aliases": [ + { + "alias": "dev-master", + "alias_normalized": "9999999-dev", + "version": "0.6.3.0", + "package": "leafo/scssphp" + } + ], + "minimum-stability": "dev", + "stability-flags": { + "leafo/scssphp-compass": 20 + }, + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">= 7.0.4" + }, + "platform-dev": [] +} diff --git a/composer.phar b/composer.phar new file mode 100644 index 0000000..425591c Binary files /dev/null and b/composer.phar differ diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..de8086b --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + ./tests + + + + + + ./src + + + diff --git a/src/Container/File.php b/src/Container/File.php new file mode 100644 index 0000000..540a607 --- /dev/null +++ b/src/Container/File.php @@ -0,0 +1,136 @@ +setSourcePath($sourcePath); + $this->outputPath = $outputPath; + } + + public function getSourcePath() : string + { + return $this->sourcePath; + } + + public function setSourcePath(string $path) : self + { + $this->sourcePath = $path; + $this->detectSourceTypeFromPath($path); + + return $this; + } + + public function getOutputPath() : string + { + return $this->outputPath; + } + + public function setOutputPath(string $path) : self + { + $this->outputPath = $path; + + return $this; + } + + public function getSourceContent() : string + { + return $this->sourceContent; + } + + public function setSourceContent(string $content) : self + { + $this->sourceContent = $content; + + return $this; + } + + public function setSourceContentFromSourcePath() : self + { + $this->sourceContent = $this->readSourceContentByPath(); + + return $this; + } + + public function getParsedContent() : string + { + return $this->parsedContent; + } + + public function setParsedContent(string $content) : self + { + $this->parsedContent = $content; + + return $this; + } + + public function getType() : string + { + return $this->type; + } + + public function setType(string $type) : self + { + $this->type = $type; + + return $this; + } + + private function detectSourceTypeFromPath(string $path) + { + switch (true) { + case 0 !== preg_match('/^.*\.' . static::TYPE_SCSS . '/', $path): + $this->type = static::TYPE_SCSS; + break; + case 0 !== preg_match('/^.*\.' . static::TYPE_SASS . '/', $path): + $this->type = static::TYPE_SASS; + break; + case 0 !== preg_match('/^.*\.' . static::TYPE_COMPASS . '/', $path): + $this->type = static::TYPE_COMPASS; + break; + case 0 !== preg_match('/^.*\.' . static::TYPE_LESS . '/', $path): + $this->type = static::TYPE_LESS; + break; + default: + $this->type = 'unknown'; + } + } + + private function readSourceContentByPath() + { + if (!file_exists($this->getSourcePath())) { + throw new FileException("file: {$this->sourcePath} doesn't exists"); + } + + return file_get_contents($this->getSourcePath()); + } +} diff --git a/src/Exception/CompilerException.php b/src/Exception/CompilerException.php new file mode 100644 index 0000000..bd773c8 --- /dev/null +++ b/src/Exception/CompilerException.php @@ -0,0 +1,7 @@ +io = $io; + $this->initCompilers(); + } + + protected function initCompilers() + { + $this->less = new LESSCompiler(); + $this->sass = new SASSCompiler(); + /** attaches compass functionality to the SASS compiler */ + $this->compass = new CompassCompiler($this->sass); + } + + public function attachFiles(string $inputPath, string $outputPath) + { + if (is_dir($inputPath)) { + $files = scandir($inputPath); + unset($files[0], $files[1]); + + foreach ($files as $file) { + $absolutePath = "$inputPath/$file"; + if (is_file($absolutePath)) { + $this->files[] = new File($absolutePath, $outputPath); + } else { + $this->attachFiles($absolutePath, $outputPath); + } + } + } else if (is_file($inputPath)) { + $this->files[] = new File($inputPath, $outputPath); + } else { + throw new \Exception('file doesn\'t exists'); + } + } + + public function concatOutput() : array + { + $outputMap = []; + foreach ($this->files as $file) { + if (!isset($outputMap[$file->getOutputPath()])) { + $outputMap[$file->getOutputPath()] = $file->getParsedContent(); + } else { + $outputMap[$file->getOutputPath()] .= $file->getParsedContent(); + } + } + + return $outputMap; + } + + public function saveOutput() + { + foreach ($this->concatOutput() as $path => $content) { + + $directory = dirname($path); + if (!is_dir($dir = $directory)) { + $this->io->write("creating directory: {$directory}"); + mkdir($directory, 0755, true); + } + + $this->io->write("creating output: {$path}"); + file_put_contents($path, $content); + } + } + + public function processFiles(string $formatter) + { + switch ($formatter) { + case 'compressed': + case 'crunched': + case 'expanded': + case 'nested': + case 'compact': + $formatter = 'Leafo\\ScssPhp\\Formatter\\' . ucfirst($formatter); + break; + default: + throw new \InvalidArgumentException('available options are: xxx'); + } +// -f=format Set the output format, includes "default", "compressed" + +// switch ($formatter) { +// case 'compressed': +// case 'crunched': +// case 'expanded': +// case 'nested': +// case 'compact': +// $formatter = 'Leafo\\ScssPhp\\Formatter\\' . ucfirst($formatter); +// break; +// default: +// throw new \InvalidArgumentException('available options are: xxx'); +// } + + foreach ($this->files as $file) { + $this->io->write("processing file: {$file->getSourcePath()}"); + $file->setSourceContentFromSourcePath(); + + switch ($file->getType()) { + case static::TYPE_COMPASS: + case static::TYPE_SCSS: + case static::TYPE_SASS: + $content = $this->sass->compile($file->getSourceContent()); + break; + case static::TYPE_LESS: + $content = $this->less->compile($file->getSourceContent()); + break; + default: + throw new CompilerException('unknown compiler'); + } + + $file->setParsedContent($content); + } + } +} diff --git a/tests/shared-fixtures/compass/app.scss b/tests/shared-fixtures/compass/app.scss new file mode 100644 index 0000000..28ded83 --- /dev/null +++ b/tests/shared-fixtures/compass/app.scss @@ -0,0 +1,16 @@ +/** + * Welcome to Compass. + * In this file you should write your main styles. (or centralize your imports) + * Import this file using the following HTML or equivalent: + * + */ + +/* @import "compass/reset"; */ + +@import "compass/reset"; +@import "sass/layout"; +@import "sass/layout-loading-animation"; +//@import "layout-loading-animation"; +// +//@import "game"; +//@import "game-results"; diff --git a/tests/shared-fixtures/compass/sass/layout-loading-animation.scss b/tests/shared-fixtures/compass/sass/layout-loading-animation.scss new file mode 100644 index 0000000..c67b62b --- /dev/null +++ b/tests/shared-fixtures/compass/sass/layout-loading-animation.scss @@ -0,0 +1,58 @@ +.loading-animation { + position: relative; + width: 57px; + + span { + animation: loading-animation 1.5s infinite ease-in-out; + background: #9b59b6; + bottom: 0; + display: block; + height: 5px; + position: absolute; + width: 9px; + + &:nth-child(2) { + animation-delay: .2s; + left: 11px; + } + + &:nth-child(3) { + animation-delay: .4s; + left: 22px; + } + + &:nth-child(4) { + animation-delay: .6s; + left: 33px; + } + + &:nth-child(5) { + animation-delay: .8s; + left: 44px; + } + + } +} + +@keyframes loading-animation { + 0% { + height: 5px; + transform: translateY(0px); + background: #9b59b6; + } + 25% { + height: 30px; + transform: translateY(15px); + background: #3498db; + } + 50% { + height: 5px; + transform: translateY(0px); + background: #9b59b6; + } + 100% { + height: 5px; + transform: translateY(0px); + background: #9b59b6; + } +} diff --git a/tests/shared-fixtures/compass/sass/layout.scss b/tests/shared-fixtures/compass/sass/layout.scss new file mode 100644 index 0000000..7a2f1da --- /dev/null +++ b/tests/shared-fixtures/compass/sass/layout.scss @@ -0,0 +1,181 @@ +body { + height: 100%; + color: #333; + font-family: 'Lato', sans-serif; + font-size: 16px; + line-height: 1.42857; + /*background: linear-gradient(135deg, #99aaa0 0%,#d197b3 33%,#e5c2c4 65%,#76588c 100%) center center / cover fixed; !* W3C *!*/ + /*background: linear-gradient(135deg, rgba(15,11,11,1) 0%,rgba(234,132,7,1) 100%) center center / cover fixed; !* W3C *!*/ + /*background: linear-gradient(135deg, rgba(173,28,52,1) 0%, rgba(237,211,220,1) 100%) center center / cover fixed; !* W3C *! */ + /*background: linear-gradient(to bottom, rgba(135,224,253,1) 0%,rgba(83,203,241,1) 40%,rgba(5,171,224,1) 100%) center center / cover fixed;*/ + + background: linear-gradient(to bottom, rgb(32, 23, 99) 0%, rgb(31, 19, 95) 40%, #a94442 100%) center center / cover fixed; + + & > .container { + width: 100%; + height: 100%; + padding: 0; + margin: 0; + } +} + +.page-sidebar, +.page-content { + transition: all 0.5s ease; + color: #fff; +} + +.page-sidebar { + position: fixed; + height: 100%; + left: 0; + z-index: 1000; + overflow-y: auto; + /*background: linear-gradient(to bottom, #b26cab 0%,#765c8b 100%); !* W3C *!*/ + background: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(255, 255, 255, 0) 100%); + border-right: 1px solid #fff; +} + +.page-sidebar, +.sidebar-nav > li { + width: 250px; +} + +.page-sidebar.toggled { + width: 0; +} + +.page-content { + padding-left: 275px; + + &.toggled { + padding-left: 25px; + + .toggle-btn { + opacity: 1; + } + } + &:not(.toggled) .toggle-btn { + opacity: 0; + } +} + +.toggle-btn { + cursor: pointer; +} + +.page-header { + font-size: 24px; + margin: 0; + padding: 40px 0 0 20px; + + &, + & > span { + line-height: 32px; + height: 75px; + } + +} + +.sidebar-nav { + list-style-type: none; + padding: 0; + margin: 0; + + & > li { + &.sidebar-brand span { + float: right; + padding-right: 10px; + } + + &:not(.sidebar-brand) { + padding: 10px 15px; + font-size: 16px; + text-align: right; + text-transform: uppercase; + background: transparent; + clear: both; + } + } + + & > li.selected, + & > li:not(.sidebar-brand):not(.no-hover):hover { + background: #fff; + color: #000; + } + & > li:not(.sidebar-brand):not(.selected):hover { + cursor: pointer; + } +} + +.page-content:not(.toggled) .toggle-btn { + opacity: 0; +} + +.page-loading { + background: rgba(2, 2, 2, 0.5); + z-index: 10002; + width: 100%; + height: 100%; + position: absolute; + + & > .loading-animation { + margin: auto; + top: 50%; + zoom: 4; + } +} + +.no-scroll-mode { + position: fixed; +} + +#notification-area { + width: calc(100% - 50px); + border: 1px solid; + min-height: 100px; + position: absolute; + border-radius: 10px; + + font-size: 72px; + z-index: 1; + text-align: center; + font-style: italic; +} + +#notification-area > .notification-control { + float: right; + margin: 10px; + font-size: 24px; + + &:hover { + font-weight: bolder; + cursor: pointer; + } +} + +#modal-area { + color: #000; + h4, label { + text-transform: uppercase; + } + + .help-block { + font-size: 14px; + font-style: italic; + } +} + +.container-fluid { + padding-left: 0; + padding-right: 0; + padding-bottom: 25px; +} + +.pagination-area { + text-align: center; +} + +a.history-title { + color: #F5DEB3; +} diff --git a/tests/shared-fixtures/sass/layout-loading-animation.scss b/tests/shared-fixtures/sass/layout-loading-animation.scss new file mode 100644 index 0000000..c67b62b --- /dev/null +++ b/tests/shared-fixtures/sass/layout-loading-animation.scss @@ -0,0 +1,58 @@ +.loading-animation { + position: relative; + width: 57px; + + span { + animation: loading-animation 1.5s infinite ease-in-out; + background: #9b59b6; + bottom: 0; + display: block; + height: 5px; + position: absolute; + width: 9px; + + &:nth-child(2) { + animation-delay: .2s; + left: 11px; + } + + &:nth-child(3) { + animation-delay: .4s; + left: 22px; + } + + &:nth-child(4) { + animation-delay: .6s; + left: 33px; + } + + &:nth-child(5) { + animation-delay: .8s; + left: 44px; + } + + } +} + +@keyframes loading-animation { + 0% { + height: 5px; + transform: translateY(0px); + background: #9b59b6; + } + 25% { + height: 30px; + transform: translateY(15px); + background: #3498db; + } + 50% { + height: 5px; + transform: translateY(0px); + background: #9b59b6; + } + 100% { + height: 5px; + transform: translateY(0px); + background: #9b59b6; + } +} diff --git a/tests/shared-fixtures/sass/layout.scss b/tests/shared-fixtures/sass/layout.scss new file mode 100644 index 0000000..7a2f1da --- /dev/null +++ b/tests/shared-fixtures/sass/layout.scss @@ -0,0 +1,181 @@ +body { + height: 100%; + color: #333; + font-family: 'Lato', sans-serif; + font-size: 16px; + line-height: 1.42857; + /*background: linear-gradient(135deg, #99aaa0 0%,#d197b3 33%,#e5c2c4 65%,#76588c 100%) center center / cover fixed; !* W3C *!*/ + /*background: linear-gradient(135deg, rgba(15,11,11,1) 0%,rgba(234,132,7,1) 100%) center center / cover fixed; !* W3C *!*/ + /*background: linear-gradient(135deg, rgba(173,28,52,1) 0%, rgba(237,211,220,1) 100%) center center / cover fixed; !* W3C *! */ + /*background: linear-gradient(to bottom, rgba(135,224,253,1) 0%,rgba(83,203,241,1) 40%,rgba(5,171,224,1) 100%) center center / cover fixed;*/ + + background: linear-gradient(to bottom, rgb(32, 23, 99) 0%, rgb(31, 19, 95) 40%, #a94442 100%) center center / cover fixed; + + & > .container { + width: 100%; + height: 100%; + padding: 0; + margin: 0; + } +} + +.page-sidebar, +.page-content { + transition: all 0.5s ease; + color: #fff; +} + +.page-sidebar { + position: fixed; + height: 100%; + left: 0; + z-index: 1000; + overflow-y: auto; + /*background: linear-gradient(to bottom, #b26cab 0%,#765c8b 100%); !* W3C *!*/ + background: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(255, 255, 255, 0) 100%); + border-right: 1px solid #fff; +} + +.page-sidebar, +.sidebar-nav > li { + width: 250px; +} + +.page-sidebar.toggled { + width: 0; +} + +.page-content { + padding-left: 275px; + + &.toggled { + padding-left: 25px; + + .toggle-btn { + opacity: 1; + } + } + &:not(.toggled) .toggle-btn { + opacity: 0; + } +} + +.toggle-btn { + cursor: pointer; +} + +.page-header { + font-size: 24px; + margin: 0; + padding: 40px 0 0 20px; + + &, + & > span { + line-height: 32px; + height: 75px; + } + +} + +.sidebar-nav { + list-style-type: none; + padding: 0; + margin: 0; + + & > li { + &.sidebar-brand span { + float: right; + padding-right: 10px; + } + + &:not(.sidebar-brand) { + padding: 10px 15px; + font-size: 16px; + text-align: right; + text-transform: uppercase; + background: transparent; + clear: both; + } + } + + & > li.selected, + & > li:not(.sidebar-brand):not(.no-hover):hover { + background: #fff; + color: #000; + } + & > li:not(.sidebar-brand):not(.selected):hover { + cursor: pointer; + } +} + +.page-content:not(.toggled) .toggle-btn { + opacity: 0; +} + +.page-loading { + background: rgba(2, 2, 2, 0.5); + z-index: 10002; + width: 100%; + height: 100%; + position: absolute; + + & > .loading-animation { + margin: auto; + top: 50%; + zoom: 4; + } +} + +.no-scroll-mode { + position: fixed; +} + +#notification-area { + width: calc(100% - 50px); + border: 1px solid; + min-height: 100px; + position: absolute; + border-radius: 10px; + + font-size: 72px; + z-index: 1; + text-align: center; + font-style: italic; +} + +#notification-area > .notification-control { + float: right; + margin: 10px; + font-size: 24px; + + &:hover { + font-weight: bolder; + cursor: pointer; + } +} + +#modal-area { + color: #000; + h4, label { + text-transform: uppercase; + } + + .help-block { + font-size: 14px; + font-style: italic; + } +} + +.container-fluid { + padding-left: 0; + padding-right: 0; + padding-bottom: 25px; +} + +.pagination-area { + text-align: center; +} + +a.history-title { + color: #F5DEB3; +} diff --git a/tests/shared-fixtures/scss/game-results.scss b/tests/shared-fixtures/scss/game-results.scss new file mode 100644 index 0000000..875afb4 --- /dev/null +++ b/tests/shared-fixtures/scss/game-results.scss @@ -0,0 +1,3 @@ +div#game-results-area table.table { + margin: 20px 0; +} diff --git a/tests/shared-fixtures/scss/game.scss b/tests/shared-fixtures/scss/game.scss new file mode 100644 index 0000000..ed94cfe --- /dev/null +++ b/tests/shared-fixtures/scss/game.scss @@ -0,0 +1,124 @@ + +.battlefield-cell-container { + display: flex; + + &:not(:first-child):not(:last-child) > .battlefield-cell[data-coordinate]:not(:first-child):not(:last-child) { + border-top: 1px solid #000; + border-left: 1px solid #000; + } + &:not(:first-child):not(:last-child) > .battlefield-cell[data-coordinate]:nth-last-child(2) { + border-right: 1px solid #000; + } + &:nth-last-child(2) > .battlefield-cell[data-coordinate]:not(:first-child):not(:last-child) { + border-bottom: 1px solid #000; + } +} + +$FLAG_UNDEFINED_FLAG: undefined; + +$FLAG_NONE_COLOR: #e1ffff; +$FLAG_NONE_FLAG: 0; + +$FLAG_DEAD_COLOR: #1e5799; +$FLAG_DEAD_FLAG: 1; + +$FLAG_SHIP_COLOR: #000; +$FLAG_SHIP_FLAG: 2; + +$FLAG_SHIP_DEAD_COLOR: #6d0019; +$FLAG_SHIP_DEAD_FLAG: 3; + +$FLAG_SKIP_COLOR: #556980; +$FLAG_SKIP_FLAG: 5; + +.history-element, +.battlefield-cell { + &[data-flags="#{$FLAG_NONE_FLAG}"] { + background: $FLAG_NONE_COLOR; + } + &[data-flags="#{$FLAG_DEAD_FLAG}"] { + background: $FLAG_DEAD_COLOR; + } + + &[data-flags="#{$FLAG_SHIP_FLAG}"] { + background: $FLAG_SHIP_COLOR; + } + + &[data-flags="#{$FLAG_SHIP_DEAD_FLAG}"] { + background: $FLAG_SHIP_DEAD_COLOR; + } + + &[data-flags="#{$FLAG_SKIP_FLAG}"] { + background: $FLAG_SKIP_COLOR; + } +} + +.battlefield-cell { + height: 32px; + width: 32px; + padding: 0; + opacity: 1; + font-size: 12px; + line-height: 32px; + text-align: center; + + &[data-flags="#{$FLAG_NONE_FLAG}"]:hover { + background: rgba(225, 255, 255, 0.75); + cursor: pointer; + } +} + +.player-area { + margin-top: 25px; + display: inline-block; + + & > .player-name { + font-size: 32px; + } + + .battlefield-cell:not([data-flags="#{$FLAG_UNDEFINED_FLAG}"]):hover { + cursor: no-drop; + } + + &[data-player-flag="1"] .battlefield-cell:not([data-flags="#{$FLAG_DEAD_FLAG}"]):not([data-flags="#{$FLAG_SHIP_DEAD_FLAG}"]):hover { + cursor: pointer; + } +} + +.player-field div[data-flags="#{$FLAG_UNDEFINED_FLAG}"] { + opacity: 0.75; +} + +div#game-current-area, +div#game-results-area { + display: inline-block; + width: 100%; +} + +li.history-container { + margin-top: 75px; + + ul { + list-style-type: none; + + li { + font-size: 12px; + vertical-align: middle; + margin: 5px 0; + } + } + + .history-title { + display: block; + text-align: center; + border-bottom: 1px dashed #fff; + margin-bottom: 10px; + } + + .history-element { + height: 28px; + width: 28px; + display: inline-block; + vertical-align: middle; + } +}