We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is there any plan to update the LessCss.php commands to Less 2.2.0?
The text was updated successfully, but these errors were encountered:
We'd need to keep both less1 and less2, so it sounds like another filter would be needed.
Sorry, something went wrong.
Hi,
I'm just having a crack at this with Lessc 2.7.1, the existing LessCss.php filter just needs this _generateScript updated to use the new syntax.
I'm still using a LessPHP version which needs more ../ on includes, 3 to be exact. And Lessc doesn't want them, so this keeps the LESS compatible
$input = str_replace('../../../', '', $input);
protected function _generateScript($file, $input) { //remove 3 ../ from here //..\/..\/..\/..\/..\/ -> ..\/..\/ $input = str_replace('../../../', '', $input); $text = <<<JS var less = require('less'), util = require('util'); var options = { paths: %s }; var lessInput = %s; //actual LESS code less.render(lessInput, options) .then(function(output) { // output.css = string of css // output.map = string of sourcemap // output.imports = array of string filenames of the imports referenced util.print(output.css); process.exit(0); }, function(error) { less.writeError(error); process.exit(1) }); JS; file_put_contents($file, sprintf($text, str_replace('\/*', '', json_encode($this->_settings['paths'])), json_encode($input))); }
No branches or pull requests
is there any plan to update the LessCss.php commands to Less 2.2.0?
The text was updated successfully, but these errors were encountered: