{"id":15679755,"url":"https://github.com/gregmolnar/yii-less","last_synced_at":"2025-05-07T10:42:35.631Z","repository":{"id":5278242,"uuid":"6457391","full_name":"gregmolnar/yii-less","owner":"gregmolnar","description":null,"archived":false,"fork":false,"pushed_at":"2017-02-12T09:07:46.000Z","size":153,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-31T09:11:13.349Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gregmolnar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-30T13:11:41.000Z","updated_at":"2018-10-20T22:02:00.000Z","dependencies_parsed_at":"2022-07-04T20:01:20.699Z","dependency_job_id":null,"html_url":"https://github.com/gregmolnar/yii-less","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregmolnar%2Fyii-less","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregmolnar%2Fyii-less/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregmolnar%2Fyii-less/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregmolnar%2Fyii-less/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregmolnar","download_url":"https://codeload.github.com/gregmolnar/yii-less/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252862153,"owners_count":21815805,"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-03T16:35:34.504Z","updated_at":"2025-05-07T10:42:35.589Z","avatar_url":"https://github.com/gregmolnar.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Yii-less\n========\n\nThis extension allows you to register your less files and they will be compiled to CSS with the option to cache.\n\nInstallation\n------------\n\nCopy the yii-less folder into the extensions folder of you app.\n\nUsage\n----\n\nIn your config file register the extension:\n```php\n'behaviors'=\u003earray(\n      'ext.yii-less.components.LessCompilationBehavior',\n),\n```\nIn your config file register your less files to precompile:\n```php\n'components'=\u003earray(\n  'lessCompiler'=\u003earray(\n    'class'=\u003e'ext.yii-less.components.LessCompiler',\n    'paths'=\u003earray(\n      // you can access to the compiled file on this path\n      'css/bootstrap.css' =\u003e array(\n        'precompile' =\u003e true, // whether you want to cache the generation\n        'compressed' =\u003e true, // Will pass the compressed option to the less compiler - Compresses all the unrequired whitespace - Defaults to false \n        'paths' =\u003e array('less/bootstrap.less') //paths of less files. you can specify multiple files.\n      ),\n    ),\n  ),\n),\n```\nRegister your asset in your layout:\n```php\nYii::app()-\u003eclientScript-\u003eregisterCssFile('css/bootstrap.css')\n```\nIf you are using the precompile option, it will set the expires header to 1 week. To bust the cache automatically, add a version number to the end of the file path when modifying the LESS file. \n\n```php\nYii::app()-\u003eclientScript-\u003eregisterCssFile('css/bootstrap.css?v=1.0.1')\n``` \nAdditional Information\n----------------------\nThis extension is heavily based on Crisu83's extension: http://www.yiiframework.com/extension/less/.\nI changed how the configuration works so they are not compatible and that's the reason for the fork. I hope he doesn't mind.\n\nContributing\n------------\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregmolnar%2Fyii-less","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregmolnar%2Fyii-less","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregmolnar%2Fyii-less/lists"}