{"id":14987458,"url":"https://github.com/codenomdev/codeigniter4-assets","last_synced_at":"2026-01-04T22:32:05.333Z","repository":{"id":56955500,"uuid":"282408056","full_name":"codenomdev/codeigniter4-assets","owner":"codenomdev","description":"Asset publishing and loading for CodeIgniter 4","archived":false,"fork":false,"pushed_at":"2020-07-25T09:33:09.000Z","size":36,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-26T13:28:55.018Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codenomdev.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":"2020-07-25T09:00:18.000Z","updated_at":"2021-01-27T07:27:42.000Z","dependencies_parsed_at":"2022-08-21T04:40:29.186Z","dependency_job_id":null,"html_url":"https://github.com/codenomdev/codeigniter4-assets","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/codenomdev%2Fcodeigniter4-assets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenomdev%2Fcodeigniter4-assets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenomdev%2Fcodeigniter4-assets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenomdev%2Fcodeigniter4-assets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codenomdev","download_url":"https://codeload.github.com/codenomdev/codeigniter4-assets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244852110,"owners_count":20521151,"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-09-24T14:14:38.651Z","updated_at":"2026-01-04T22:32:05.300Z","avatar_url":"https://github.com/codenomdev.png","language":"PHP","readme":"# codeigniter4-assets\nAsset publishing and loading for CodeIgniter 4\n\n## Quick Start\n\n1. Install with Composer: `\u003e composer require codenom/assets`\n2. Put CSS \u0026 JS files in: **public/assets**\n3. Add additional assets to config: **app/Config/Assets.php**\n3. Add in head tag: `\u003c?= service('assets')-\u003ecss() ?\u003e`\n4. Add to footer: `\u003c?= service('assets')-\u003ejs() ?\u003e`\n\n## Features\n\nProvides out-of-the-box asset loading for CSS and JavaScript files for CodeIgniter 4\n\n## Installation\n\nInstall easily via Composer to take advantage of CodeIgniter 4's autoloading capabilities\nand always be up-to-date:\n* `\u003e composer require codenom/assets`\n\nOr, install manually by downloading the source files and adding the directory to\n`app/Config/Autoload.php`.\n\n## Configuration (optional)\n\nThe library's default behavior can be overridden or augment by its config file. Copy\n**examples/Assets.php** to **app/Config/Assets.php** and follow the instructions in the\ncomments. If no config file is found the library will use its defaults.\n\n## Usage\n\nIf installed correctly CodeIgniter 4 will detect and autoload the library, service, and\nconfig. Use the library methods `css()` and `js()` to display tags for the route-specific assets:\n`\u003c?= service('assets')-\u003ecss() ?\u003e`\n\n## Structure\n\nThe library searches the assets directory (default: **public/assets**) for files matching\nthe current route, loading them in a cascading fashion for each route segment.\n\n**Example:** https://example.com/users/view/30\n\nThe library will first load any root assets (`public/assets/*.css *.js`), then assets in\nthe \"users\" subfolder (`public/assets/users/`), then \"view\" subfolder, then \"12\" subfolder.\nAny missing or invalid folders are ignored.\n\nAdditional assets may be specified from the config variable `$routes` - this is particularly\nhelpful for including pre-bundled libraries. `$routes` maps each route to an asset file or\na directory of assets to load for that route.\n\n**Example:**\n\n```\npublic $routes = [\n\t'' =\u003e [\n\t\t'bootstrap/dist/css/bootstrap.min.css',\n\t\t'bootstrap/dist/js/bootstrap.bundle.min.js'\n\t],\n\t'files/upload' =\u003e [\n\t\t'vendor/dropzone'\n\t]\n];\n```\n\nThis tells the library to load the Bootstrap assets for every route (`''`) without having\nto move it from its pre-bundled subdirectory. It also will load any assets in the `dropzone`\ndirectory for the specified route.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodenomdev%2Fcodeigniter4-assets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodenomdev%2Fcodeigniter4-assets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodenomdev%2Fcodeigniter4-assets/lists"}