artem-frolov / yii-sass Goto Github PK
View Code? Open in Web Editor NEWSASS and Compass support for the Yii framework
License: MIT License
SASS and Compass support for the Yii framework
License: MIT License
Hi!
I have few scss files in my styles folder: search.scss, widgets/search.php.
The problem is, that these two files are overwriting each other, when compiling. As a result i have only one 'search.css' in the folder with compiled files, that contains either first 'search.scss' or 'widgets/search.php' file's content.
Is there a quick fix for that? Else i can make PR for that, i think.
/**
* Save a list of parsed files to the cache
* with the time files were last modified.
* Must be called right after the compilation.
*
* @param string $sourcePath Path to the source SCSS file
*/
protected function saveParsedFilesInfoToCache($sourcePath)
{
$parsedFiles = $this->compiler->getParsedFiles();
$parsedFiles[$sourcePath] = filemtime($sourcePath);
$parsedFilesWithTime = array();
foreach ($parsedFiles as $file=>$value) {
$parsedFilesWithTime[$file] = filemtime($file);
}
Please change line 359 of SassHandler from:
if (!file_put_contents($cssPath, $compiledCssCode, LOCK_EX)) {
to:
if (file_put_contents($cssPath, $compiledCssCode, LOCK_EX)===false) {
We have some autogenerated files that we need to be compiled in and some of them are empty, thus the file put contents returns 0 bytes written - meaning all went fine as the file compiled was empty.
I am trying to use the latest scssphp compiler version, which is '0.6.7' on yii 1.1.18. The error happens on the above method when trying to run 'filemtime($file)'. This happens because the returned info from the getParsedFiles() has changed a little bit.
Return info is array( 'fileName' => 'mtime' ), so the argument is the mtime on the filemtime function
A solution to this is to immediately put $parsedFiles to $parsedFilesWithTime
I found that the SCSS will compile after I refresh the browser, but what if I want to run
compass watch
what should I do?
I don't see anything in the documentation about generating an absolute path rather than a relative one, does such capability exist?
I think leafo/sass has updated, there are different class names now and namespaces
and yii-sass doesnot work now :/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.