{"id":15314704,"url":"https://github.com/unframework/lessphp","last_synced_at":"2025-10-09T00:32:45.251Z","repository":{"id":1633160,"uuid":"2357069","full_name":"unframework/lessphp","owner":"unframework","description":"LESS compiler written in php","archived":false,"fork":true,"pushed_at":"2011-09-09T07:23:32.000Z","size":275,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-14T18:22:16.353Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://leafo.net/lessphp","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"leafo/lessphp","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unframework.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-09-09T17:58:23.000Z","updated_at":"2019-08-13T14:50:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/unframework/lessphp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unframework%2Flessphp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unframework%2Flessphp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unframework%2Flessphp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unframework%2Flessphp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unframework","download_url":"https://codeload.github.com/unframework/lessphp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219877247,"owners_count":16554912,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T08:46:43.979Z","updated_at":"2025-10-09T00:32:39.919Z","avatar_url":"https://github.com/unframework.png","language":"PHP","readme":"# lessphp v0.2.0\n#### \u003chttp://leafo.net/lessphp\u003e\n\n`lessphp` is a compiler for LESS written in php.\nFor a complete description of the language see \u003chttp://leafo.net/lessphp/docs/\u003e\n\n### How to use in your php project\n\nCopy lessc.inc.php to your include directory and include it into your project.\n\nThere are a few ways to interface with the compiler. The easiest is to have it\ncompile a LESS file when the page is requested. The static function \n`lessc::ccompile`, checked compile, will compile the input LESS file only when it\nis newer than the output file.\n\n\ttry {\n\t\tlessc::ccompile('input.less', 'output.css');\n\tcatch (exception $ex) {\n\t\texit($ex-\u003egetMessage());\n\t}\n\nNote that all failures with lessc are reported through exceptions.\nIf you need more control you can make your own instance of lessc.\n\n\t$input = 'mystyle.less';\n\n\t$lc = new lessc($input);\n\n\ttry {\n\t\tfile_put_contents('mystyle.css', $lc-\u003eparse());\n\t} catch (exception $ex) { ... }\n\nIn addition to loading from file, you can also parse from a string like so:\n\n\t$lc = new lessc();\n\t$lesscode = 'body { ... }';\n\t$out = $lc-\u003eparse($lesscode);\n\n### How to use from the command line\n\nAn additional script has been included to use the compiler from the command\nline. In the simplest invocation, you specify an input file and the compiled\ncss is written to standard out:\n\n\t~\u003e plessc input.less \u003e output.css\n\nUsing the -r flag, you can specify LESS code directly as an argument or, if \nthe argument is left off, from standard in:\n\n\t~\u003e plessc -r \"my less code here\"\n\nFinally, by using the -w flag you can watch a specified input file and have it \ncompile as needed to the output file\n\n\t~\u003e plessc -w input-file output-file\n\nErrors from watch mode are written to standard out.\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funframework%2Flessphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funframework%2Flessphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funframework%2Flessphp/lists"}