Collection of JavaScript scripts and components as Symfony Bundle.
-
Add the following lines into application composer.json file at "scripts" and "repositories" blocks.
"scripts": { "post-install-cmd": [ ... "ArturDoruch\\JsBundle\\Composer\\ScriptHandler::installJs" ], "post-update-cmd": [ ... "ArturDoruch\\JsBundle\\Composer\\ScriptHandler::installJs" ] }, "repositories": [ ... { "type": "vcs", "url": "https://github.com/arturdoruch/JsBundle" } ]
-
Install bundle by running cli command
composer require "arturdoruch/js-bundle"
-
Register bundle in application kernel class.
public function registerBundles() { $bundles = [ // ... new ArturDoruch\JsBundle\ArturDoruchJsBundle() ]; }
-
Install assets
php bin/console assets:install --symlink