Git Product home page Git Product logo

yii-sass's People

Contributors

alexdevid avatar aloumpas avatar artem-frolov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

yii-sass's Issues

Two compiled files with same names but different directories are overwriting each other

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.

Fixed saveParsedFilesInfoToCache() in SassHandler.php

/**
 * 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 if (!file_put_contents($cssPath, $compiledCssCode, LOCK_EX)) {

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.

Error on SassHandler::saveParsedFilesInfoToCache

  • 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

how can I run Compass watch

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?

leafo/sass dev updated

I think leafo/sass has updated, there are different class names now and namespaces
and yii-sass doesnot work now :/

create a lot of hex folder after compiled.

I am using Yii 1.1.x after integrate your extension then I found something wrong with out.
It generate a lof of css folder without delete previous output folder

screen shot 2017-06-29 at 8 54 13 am

How can it auto-remove the previous after each compilation?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.