{"id":15025539,"url":"https://github.com/hurnell/cakephp-webpack-encore-view-helper","last_synced_at":"2026-02-03T20:02:35.140Z","repository":{"id":56987178,"uuid":"180738230","full_name":"hurnell/cakephp-webpack-encore-view-helper","owner":"hurnell","description":"CakePhp view helper plugin to load webpack-encore assets. Reads entrypoints.json and manifest.json and loads the assets referenced herein when requested.","archived":false,"fork":false,"pushed_at":"2019-04-11T09:21:33.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-11T15:32:54.888Z","etag":null,"topics":["cakephp","cakephp-plugin","cakephp3","encore","php71","webpack4"],"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/hurnell.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":"2019-04-11T07:27:42.000Z","updated_at":"2019-04-11T09:25:17.000Z","dependencies_parsed_at":"2022-08-21T09:40:25.958Z","dependency_job_id":null,"html_url":"https://github.com/hurnell/cakephp-webpack-encore-view-helper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hurnell/cakephp-webpack-encore-view-helper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hurnell%2Fcakephp-webpack-encore-view-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hurnell%2Fcakephp-webpack-encore-view-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hurnell%2Fcakephp-webpack-encore-view-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hurnell%2Fcakephp-webpack-encore-view-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hurnell","download_url":"https://codeload.github.com/hurnell/cakephp-webpack-encore-view-helper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hurnell%2Fcakephp-webpack-encore-view-helper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29055609,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T15:43:47.601Z","status":"ssl_error","status_checked_at":"2026-02-03T15:43:46.709Z","response_time":96,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cakephp","cakephp-plugin","cakephp3","encore","php71","webpack4"],"created_at":"2024-09-24T20:02:32.444Z","updated_at":"2026-02-03T20:02:35.124Z","avatar_url":"https://github.com/hurnell.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebpackEncoreViewHelper plugin for CakePHP\n\n## Installation\n\nYou can install this plugin into your CakePHP application using [composer](http://getcomposer.org).\n\nThe recommended way to install composer packages is:\n\n```\ncomposer require hurnell/cakephp-webpack-encore-view-helper\n```\n\nMake sure that composer.json of your CakePHP installation contains:\n```\n\"minimum-stability\": \"dev\",\n\"prefer-stable\": true\n```\n\n## Initialize\n\nIn App/View/AppView add use statement and update initialize method:\n\n```\nuse Hurnell\\WebpackEncoreViewHelper\\View\\Helper\\EncoreHelper\n\n$this-\u003eloadHelper('Encore', [\n    'className'=\u003e EncoreHelper::class\n]);\n```\n\n## Usage\n\nIn your .ctp files just add:\n```\n    \u003c?= $this-\u003eEncore-\u003eload('build/js/entry.js') ?\u003e\n    \u003c?= $this-\u003eEncore-\u003eload('build/js/entry.css') ?\u003e\n    \u003c?= $this-\u003eEncore-\u003eload('build/css/main.css') ?\u003e\n```\n\nThese entrypoints are defined in your webpack.config.js file (see dist directory).\n\nI have also included my package.json file in the dist directory to shows the packages I have installed to support this version of webpack.config.js. \n\nNote that the only way that I was able to get hot module replacement (auto reload web-page when you update asset files) to work was with:\n```\nyarn encore dev-server --port 8080 --disableHostCheck=true\n```\nThere is a shortcut defined under scripts in package.json:\n```\nyarn dev-server\n```\n\nCheck out [webpack-visualizer](https://chrisbateman.github.io/webpack-visualizer/) to help optimise your imports. Just run ```yarn stats ``` and upload the resulting stats.json file to this website.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhurnell%2Fcakephp-webpack-encore-view-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhurnell%2Fcakephp-webpack-encore-view-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhurnell%2Fcakephp-webpack-encore-view-helper/lists"}