Download the PHP package artem-frolov/yii-sass without Composer
On this page you can find all versions of the php package artem-frolov/yii-sass. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download artem-frolov/yii-sass
More information about artem-frolov/yii-sass
Files in artem-frolov/yii-sass
Package yii-sass
Short Description Sass (SCSS) and Compass support for the Yii framework
License MIT
Homepage https://github.com/artem-frolov/yii-sass
Informations about the package yii-sass
Sass (SCSS) and Compass support for the Yii framework
yii-sass extension implements Sass and Compass support: compilation on-the-fly, publishing, registration in views.
External Sass tools are NOT used, compilation is done using PHP compiler.
Only SCSS syntax is supported.
Indented syntax is not supported.
Sass is an extension of CSS that adds power and elegance to the basic language. It allows you to use variables, nested rules, mixins, inline imports, and more, all with a fully CSS-compatible syntax. Sass helps keep large stylesheets well-organized, and get small stylesheets up and running quickly.
Compass is an open-source CSS authoring framework which uses the Sass stylesheet language to make writing stylesheets powerful and easy.
This extension caches compiled CSS code and prevents recompilation if there is no need in it.
Requirements
- PHP >= 5.4
- Yii 1.0 or 1.1
- scssphp compiler
- scssphp-compass library - only if Compass support is needed
Installation
Installation can be done using Composer or manually by downloading required files.
Install using Composer
-
Install artem-frolov/yii-sass package from Packagist. Required libraries will be installed automatically.
Execute in your application's directory: - Update your application's configuration (e.g. protected/config/main.php) like this:
Install manually
- Download yii-sass extension
Put files to the "protected/extensions/yii-sass" directory so the path to the SassHandler.php will look like "protected/extensions/yii-sass/SassHandler.php" - Download scssphp compiler
Put files to the "protected/vendor/scssphp" directory - Download scssphp-compass library
Skip this step if you don't need Compass support
Put files to the "protected/vendor/scssphp-compass" directory - Update your application's configuration (e.g. protected/config/main.php) like this:
Usage
Add the code like the following to your views/layout.
It will compile SCSS file (or recompile if needed), publish and register compiled CSS file:
Component options
All options below are optional except the "class" item.
Component methods
Unit Tests
Execute the following commands in the root directory of yii-sass
extension to run unit tests.
For Windows:
For Linux/Mac/etc.:
Changelog
-
Version 2.0.1 — 2017-11-09
-
15: Fix an error with the compilation of empty files (tomaszbrunarski)
-
-
Version 2.0.0 — 2017-05-01
- Update scssphp compiler to version ~0.6.7
- Minimum required PHP version is changed to >= 5.4.0
- Allow to use custom Yii caching components by configuring "cacheComponentId" option
-
Version 1.3.0 — 2015-02-21
- Fix
CAssetManager::publish()
call - pass$hashByName
value used inYii::app()->sass->publish()
andYii::app()->sass->register()
methods - Remove deprecated PHPUnit
strict
setting - Do not use unstable (
dev-master
) version ofscssphp
compiler anymore when Composer is used to install yii-sass extension - Make installation via Composer easier -
minimum-stability
setting is not needed anymore - Add
writableFilePermissions
option (defaults to0666
), fix file permissions issues with certain umask settings in OS by calling chmod for created/updated files, always call chmod for writable directories - Add
defaultHashByName
setting which allows to set a default$hashByName
value for all plugin's methods - Add more information to exceptions' messages
- Enable Travis CI builds
- Update documentation
- Fix
-
Version 1.2.1 — 2014-11-04
- Bug #4: Don't overwrite a compiled file during the compilation of another source file which has the same basename
-
Version 1.2.0 — 2014-08-12
- Fix compatibility with the new
0.1
version of thescssphp
compiler (alexdevid) - Set minimum required PHP version to 5.3 because the new version
of
scssphp
compiler requires it - Add new formatting type
SassHandler::OUTPUT_FORMATTING_CRUNCHED
which can be used withcompilerOutputFormatting
parameter (alexdevid) - Add unit tests to check integration with
scssphp
compiler and withscssphp-compass
library - Fix a bug:
$hashByName=true
argument wasn't properly passed to the Yii's asset manager - Minor fixes and improvements
- Fix compatibility with the new
-
Version 1.1.0 — 2014-02-07
- Allow to register and publish compiled CSS files inside specific published directory to allow using of relative references in CSS for images, fonts and other published files
- Add
compilerOutputFormatting
component option, allow to switch betweensimple
,nested
andcompressed
(Pavel Volyntsev) - Change default value of the
writableDirectoryPermissions
component option from0644
to0777
. It should prevent permission errors on some Linux servers - Update code style and documentation
- Version 1.0.0 — 2013-12-16
- Initial release
Resources
All versions of yii-sass with dependencies
leafo/scssphp Version ~0.6.7
artem-frolov/scssphp-compass Version 0.1.*