{"id":19562475,"url":"https://github.com/inpassor/yii-eassetmanager","last_synced_at":"2025-04-27T00:31:47.402Z","repository":{"id":11204121,"uuid":"13588510","full_name":"Inpassor/yii-EAssetManager","owner":"Inpassor","description":"Yii Extended Asset Manager","archived":false,"fork":false,"pushed_at":"2016-07-29T10:13:15.000Z","size":45,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-17T18:21:52.332Z","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/Inpassor.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":"2013-10-15T11:44:42.000Z","updated_at":"2024-04-17T18:21:52.333Z","dependencies_parsed_at":"2022-09-03T02:01:50.086Z","dependency_job_id":null,"html_url":"https://github.com/Inpassor/yii-EAssetManager","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inpassor%2Fyii-EAssetManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inpassor%2Fyii-EAssetManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inpassor%2Fyii-EAssetManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inpassor%2Fyii-EAssetManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Inpassor","download_url":"https://codeload.github.com/Inpassor/yii-EAssetManager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224050675,"owners_count":17247380,"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-11-11T05:14:44.076Z","updated_at":"2024-11-11T05:14:45.593Z","avatar_url":"https://github.com/Inpassor.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"EAssetManager class file.\n \nExtended Asset Manager\nCompiles .less file(s) on-the-fly and publishes output .css file\n \nAuthor: Inpassor \u003cinpassor@yandex.com\u003e .\nLink: https://github.com/Inpassor/yii-EAssetManager .\nVersion: 0.3 (2013.10.24) .\n\n\nINSTALLATION\n============\n\n##Install with composer:\n\n```\ncomposer require inpassor/yii-eassetmanager\n```\n\n##Manual install:\n\n1. Copy EAssetManager.php to /protected/vendor/ directory\n2. Add or replace the assetManager component in /protected/config/main.php like that:\n\n```\n\t'components'=\u003earray(\n\n\t\t...\n\n\t\t'assetManager'=\u003earray(\n\t\t\t'class'=\u003e'EAssetManager',\n\t\t\t'lessCompile'=\u003etrue,\n\t\t\t'lessCompiledPath'=\u003e'application.assets.css',\n\t\t\t'lessFormatter'=\u003e'compressed',\n\t\t\t'lessForceCompile'=\u003efalse,\n\t\t),\n\n\t\t...\n\n\t),\n```\n\nSee code of EAssetManager.php to read description of public properties.\n\n3. CHMOD 'lessCompiledPath' directory to 0777 in order to create new files there by EAssetManager.\n4. Optional: enable Yii caching. Otherwise, EAssetManager will create (or use existing) directory /protected/runtime/cache/ and store cache data there.\nYou can override this path by setting public property 'cachePath'.\n\n\nUSAGE\n=====\n\nJust publish .less file with assetManager like that:\n\n```\n$css = CHtml::asset(Yii::app()-\u003ebasePath.'/vendors/bootstrap/less/bootstrap.less');\n```\n\nThat's all :)\n\n\nAlso it might be useful to pre-compile .less files. For example, to make command which compiles .less files in background.\nIn this case you can use \"lessCompile\" method:\n\n```\nYii::app()-\u003eassetManager-\u003elessCompile(Yii::app()-\u003ebasePath.'/vendors/bootstrap/less/bootstrap.less');\n```\n\nOutput .css file will be stored under 'lessCompiledPath' directory.\nAnd then add already compiled file in your application:\n\n```\n$css = CHtml::asset(Yii::app()-\u003eassetManager-\u003elessCompiledPath.'/bootstrap.css');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finpassor%2Fyii-eassetmanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finpassor%2Fyii-eassetmanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finpassor%2Fyii-eassetmanager/lists"}