Skip to content

Conversation

@pprossi
Copy link

@pprossi pprossi commented Sep 24, 2019

Hi, Sorry you have to ignore the composer.json.

I've updated the scssphp to Version 1.0.4 and added the ability to set Import Pathes in Typoscript.

Now for example you can import from other directories or from some librarys like bower or node.

May be usefull but cacheing does not respekt it at the moment. May be you have some idea how to calculate the caching hash from $this->parser->getParsedFiles()?

pprossi and others added 4 commits September 22, 2019 17:59
Added Import Path Configuration and Handling
added ts example params
@svewap
Copy link
Collaborator

svewap commented Sep 25, 2019

Thank you. I will look for it and I will see what I can merge.

@pprossi
Copy link
Author

pprossi commented Sep 25, 2019

I've seen that the new version of scssphp provides an new caching function.
Providing caching options to the compiler constructor activates it.

So something like this (RenderPreProcessorHook.php@244f):

        $scssCacheOptions = [
            'cache_dir' => $this->getStreamlinedPath('typo3temp/var/data/ws_scss/'),
            'prefix' => 'scssphp_',
            'forceRefresh' => false
        ];

        try {
            $this->parser = new \ScssPhp\ScssPhp\Compiler($scssCacheOptions);
        }catch(Exception $e){
            debug($e);
        }

would store caching files for each parsed include inside the caching folder.
may be that helps recompiling on file changes in different files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants