{"id":18781567,"url":"https://github.com/devture/silex-asset-bundle","last_synced_at":"2025-12-19T10:30:14.772Z","repository":{"id":56967129,"uuid":"76435283","full_name":"devture/silex-asset-bundle","owner":"devture","description":"Silex bundle that provides some simple project assets linking","archived":false,"fork":false,"pushed_at":"2017-03-17T16:37:35.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-29T11:16:18.597Z","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devture.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-14T07:25:18.000Z","updated_at":"2016-12-14T07:25:55.000Z","dependencies_parsed_at":"2022-08-21T09:50:44.863Z","dependency_job_id":null,"html_url":"https://github.com/devture/silex-asset-bundle","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/devture%2Fsilex-asset-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devture%2Fsilex-asset-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devture%2Fsilex-asset-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devture%2Fsilex-asset-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devture","download_url":"https://codeload.github.com/devture/silex-asset-bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239699208,"owners_count":19682537,"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-07T20:32:37.569Z","updated_at":"2025-12-19T10:30:14.685Z","avatar_url":"https://github.com/devture.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Asset Bundle\n\nProvides asset linking.\n\n## Configuration example\n\nExample for the article bundle data source:\n\n\t\"AssetBundle\": {\n\t\t\"allow_cdn\": true,\n\t\t\"asset_path\": \"/srv/http/example.com/web\",\n\t\t\"asset_url_prefix\": \"\"\n\t}\n\n## Initializing\n\n\t$namespace = 'asset';\n\t$app-\u003eregister(new \\Devture\\Bundle\\AssetBundle\\ServicesProvider($asset, $this['config']['AssetBundle']));\n\nAll provided Twig functions will be prefixed with `asset_` (the namespace used when registering).\n\n## Usage\n\n### Basic Asset Loading\n\nUsing the `asset_url(LOCAL_FILE)` function would generate a URL to the file.\nThe file will be timestamped with its last-modification-time, for caching (cache-busting) purposes.\n\n\t\u003cscript type='text/javascript' src='{{ asset_url('/js/jquery.min.js') }}'\u003e\u003c/script\u003e\n\nResult:\n\n\t\u003cscript type='text/javascript' src='/js/jquery.min.js?1448329282'\u003e\u003c/script\u003e\n\n### CDN-backed Asset Loading\n\nJust like `asset_url(LOCAL_FILE)`, you can use `asset_url_with_cdn(LOCAL_FILE, CDN_MIRROR_URI)`\nto specify a resource which is available both at the `LOCAL_FILE` path and at the `CDN_MIRROR_URI` URI.\n\nBased on the `allow_cdn` configuration parameter (passed when registering the bundle),\nthe appropriate URI will be used.\n\nExample:\n\n\t\u003cscript type='text/javascript'\n\t\tsrc='{{ asset_url('/js/jquery.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js') }}'\u003e\u003c/script\u003e\n\nResult (if CDN usage is allowed in the configuration):\n\n\t\u003cscript type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js'\u003e\u003c/script\u003e\n\nResult (if CDN usage is NOT allowed in the configuration):\n\n\t\u003cscript type='text/javascript' src='/js/jquery.min.js?1448329282'\u003e\u003c/script\u003e\n\n\nIf you rely on CDN-loading, you may also with to make use of [Subresource Integrity](http://www.w3.org/TR/SRI/),\nto ensure that the resource you're loading is the one you expect.\n\nExample:\n\n\t\u003cscript type='text/javascript'\n\t\tsrc='{{ asset_url('/js/jquery.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js') }}'\n\t\tintegrity=\"sha384-6ePHh72Rl3hKio4HiJ841psfsRJveeS+aLoaEf3BWfS+gTF0XdAqku2ka8VddikM\"\n\t\tcrossorigin=\"anonymous\"\u003e\u003c/script\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevture%2Fsilex-asset-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevture%2Fsilex-asset-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevture%2Fsilex-asset-bundle/lists"}