{"id":20903542,"url":"https://github.com/phly/phlyrequirejs","last_synced_at":"2025-05-13T04:33:20.350Z","repository":{"id":6054769,"uuid":"7279931","full_name":"phly/PhlyRequireJs","owner":"phly","description":"View helper for aggregating require()s for use with RequireJS-compatible libraries.","archived":false,"fork":false,"pushed_at":"2014-07-17T13:56:49.000Z","size":140,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-01T18:12:04.981Z","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/phly.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-12-21T22:23:42.000Z","updated_at":"2021-06-28T08:48:24.000Z","dependencies_parsed_at":"2022-09-22T06:51:39.095Z","dependency_job_id":null,"html_url":"https://github.com/phly/PhlyRequireJs","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/phly%2FPhlyRequireJs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phly%2FPhlyRequireJs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phly%2FPhlyRequireJs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phly%2FPhlyRequireJs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phly","download_url":"https://codeload.github.com/phly/PhlyRequireJs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253877265,"owners_count":21977632,"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-18T13:14:04.001Z","updated_at":"2025-05-13T04:33:19.778Z","avatar_url":"https://github.com/phly.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"PhlyRequireJs\n=============\n\n[https://travis-ci.org/phly/PhlyRequireJs.svg?branch=master](https://travis-ci.org/phly/PhlyRequireJs)\n\nSimple library providing a ZF2 view helper for aggregating RequireJs calls.\n\nInstallation\n------------\n\nInstall the module via git submodules, unzipping the download zipball, or,\nlater, via Composer.\n\nEnable it in a ZF2 module by adding the \"PhlyRequireJs\" module to your\n`config/application.config.php` file.\n\nIf not using in ZF2, but standalone with the ZF2 `PhpRenderer`, you will need to\nadd the `requirejs` helper as an invokable to the `ViewHelperManager`.\n\nUsage\n-----\n\n```php\n\u003c?php\n\n// require([\"foo/bar\"], function () {});\n$this-\u003erequirejs()-\u003eappend('foo/bar'); \n\n// require([\"foo/bar\"], function (bar) { bar.baz(); });\n$this-\u003erequirejs()-\u003eappend('foo/bar', 'function (bar) { bar.baz(); }'); \n\n// Capture the callback\n$this-\u003erequirejs()-\u003eappendAndCaptureCallback('foo/bar'); ?\u003e\nfunction(bar) {\n    bar.baz();\n    bar.onClick(bar.doSomething);\n}\n\u003c?php\n$this-\u003erequirejs()-\u003estopCapture();\n\n// Echo all requires\necho $this-\u003erequirejs();\n```\n\nThe view helper also defines `prepend` and `prependAndCaptureCallback` methods;\nthey work identically, but prepend the require to the start of the list.\n\nLICENSE\n-------\n\nBSD-2-Clause\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphly%2Fphlyrequirejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphly%2Fphlyrequirejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphly%2Fphlyrequirejs/lists"}