Demo of compiling Symfony's EventDispatcher component to JavaScript, as used in the docs for PHPify.
The bundle has already been compiled for you, just open demo.html in a browser to test it out!
Install the JS and PHP dependencies:
npm install
composer installAn extra script has been added to package.json in this repo:
"build": "mkdir -p dist && browserify index > dist/bundle.js"so that you can just run npm run build to rebuild the JS bundle after making any changes.