Download the PHP package splitbrain/lesserphp without Composer

On this page you can find all versions of the php package splitbrain/lesserphp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package lesserphp

LesserPHP (reloaded)

LesserPHP is a compiler for LESS written in PHP. It is based on lessphp by @leafo. The original has been abandoned in 2014. The fork by @MarcusSchwarz has been mostly abandoned in 2021. There are other forks with dubious status.

This is an opinionated fork with the goal to modernize the code base enough to be somewhat easier to maintain without completely rewriting it. It is meant to be used as a stable base for DokuWiki. This means features not needed for this goal are removed.

Please note that this fork is based on the 0.6.0-dev branch of MarcusSchwarz/lesserphp, not the much modernized master branch. This has two reasons:

  1. The master was not up-to-date with all the bug fixes in the 0.6.0-dev branch (some of which had been contributed by DokuWiki developers)
  2. I simply only noticed the considerable refactoring Marcus had done in the master branch after I had already started my own refactoring. I did not want to start over again. His approach is much more radical than mine and probably took more than the long weekend I had available for this.

Contributing and Bugs

Please report bugs to the issue tracker. Fixes are only likely when DokuWiki needs them, or you provide a pull request.

Feature Requests will be ignored unless accompanied by a pull request.

How to use in your PHP project

Don't. You really wouldn't want to start a new project using LESS. It simply seems that SASS has won the battle. Or maybe even skip the whole CSS preprocessor thing - modern CSS is quite powerful on its own.

If you are already using lessphp in one of it's many forks, using this one isn't too different.

You can still look at the original documentation for the most part. The API is mostly the same. Refer to the upstream documentation the bundled Documentation for the LESS syntax itself. Keep in mind that some more modern features are not supported by LesserPHP.

To install it, use composer:

The typical flow of LesserPHP is to create a new instance of Lessc, configure it how you like, then tell it to compile something using one built in compile methods.

The compile method compiles a string of LESS code to CSS.

The compileFile method reads and compiles a file. It will either return the result or write it to the path specified by an optional second argument.

If there's any problem compiling your code, an exception is thrown with a helpful message:


All versions of lesserphp with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package splitbrain/lesserphp contains the following files

Loading the files please wait ....