{"id":18605917,"url":"https://github.com/axllent/silverstripe-minifier","last_synced_at":"2025-04-10T20:31:14.348Z","repository":{"id":56071585,"uuid":"106236322","full_name":"axllent/silverstripe-minifier","owner":"axllent","description":"CSS \u0026 JavaScript minifier, in PHP for Silverstripe","archived":false,"fork":false,"pushed_at":"2025-03-08T05:21:28.000Z","size":20,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T04:06:45.885Z","etag":null,"topics":["css","javascript","minifier","minify","silverstripe-4","silverstripe-5"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/axllent.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-09T04:24:16.000Z","updated_at":"2025-03-08T05:21:23.000Z","dependencies_parsed_at":"2024-02-18T20:29:51.723Z","dependency_job_id":"50fb8d09-fd4e-48e1-8075-3660320c81b9","html_url":"https://github.com/axllent/silverstripe-minifier","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.25,"last_synced_commit":"2585f14d9697f74cdf9ebe4261062913a22316cc"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axllent%2Fsilverstripe-minifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axllent%2Fsilverstripe-minifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axllent%2Fsilverstripe-minifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axllent%2Fsilverstripe-minifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/axllent","download_url":"https://codeload.github.com/axllent/silverstripe-minifier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248290033,"owners_count":21078923,"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":["css","javascript","minifier","minify","silverstripe-4","silverstripe-5"],"created_at":"2024-11-07T02:23:34.637Z","updated_at":"2025-04-10T20:31:13.968Z","avatar_url":"https://github.com/axllent.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CSS \u0026 JavaScript minifier for Silverstripe\n\nAutomatically minify combined CSS \u0026 JavaScript files in Silverstripe 5 when running `Requirements::process_combined_files()`.\nInternally it uses [matthiasmullie/minify](https://github.com/matthiasmullie/minify) to remove whitespace, strips comments and combines files.\n\nThis is useful if you do not require any JavaScript bundling or transpiling (eg: webpak, esbuild etc) but you still wish to minify the combined CSS and JavaScript files.\n\n\n## Requirements\n\n- Silverstripe ^5\n\n\n## Installation\n\n```shell\ncomposer require axllent/silverstripe-minifier\n```\n\nThis module is plug-and-play, no configuration required after installing and running a `?flush`.\n\n\n## Usage example\n\n```php\n\u003c?php\n\nuse SilverStripe\\CMS\\Controllers\\ContentController;\nuse SilverStripe\\View\\Requirements;\n\nclass PageController extends ContentController\n{\n    /**\n     * Init function\n     *\n     * @return void\n     */\n    protected function init()\n    {\n        parent::init();\n\n        $css[] = 'themes/site/css/file1.css';\n        $css[] = 'themes/site/css/file2.css';\n        $css[] = 'themes/site/css/file3.css';\n        Requirements::combine_files('combined.css', $css);\n        Requirements::process_combined_files();\n\n        $js[] = 'themes/site/js/file1.js';\n        $js[] = 'themes/site/js/file2.js';\n        $js[] = 'themes/site/js/file3.js';\n        Requirements::combine_files('combined.js', $js);\n        Requirements::process_combined_files();\n    }\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxllent%2Fsilverstripe-minifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxllent%2Fsilverstripe-minifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxllent%2Fsilverstripe-minifier/lists"}