bravesheep / live-reload-bundle
Automatically include the live reload script in Symfony
Installs: 21 213
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 3
Forks: 2
Open Issues: 0
Requires
- php: >=5.4.0
- symfony/config: ^2.3|^3.0
- symfony/dependency-injection: ^2.3|^3.0
- symfony/event-dispatcher: ^2.3|^3.0
- symfony/http-kernel: ^2.3|^3.0
This package is not auto-updated.
Last update: 2022-11-21 20:35:07 UTC
README
A Symfony bundle that automatically includes a link to the livereload script in any html response (based on configuration).
Inspired by the KunstmaanLiveReloadBundle.
Installation and configuration
Using Composer add the bundle to your dependencies using the require command. This command adds the bundle only for development purposes:
composer require --dev bravesheep/live-reload-bundle
Add the bundle to your AppKernel
Add the bundle in your app/AppKernel.php
. To add it to just your development
bundles:
public function registerBundles() { // ... if (in_array($this->getEnvironment(), ['dev', 'test'])) { // ... $bundles[] = new Bravesheep\LiveReloadBundle\BravesheepLiveReloadBundle(); } // ... }
Configure the bundle
The bundly does not need any configuration and should work right away. However you can customize some settings, you can adjust the default configuration as shown below:
bravesheep_live_reload: enabled: yes host: ~ port: 35729
You may want to parameterize the enabled flag to allow individual developers to pick whether or not to enable livereload:
bravesheep_live_reload: enabled: %livereload%
And in your app/config/parameters.yml
:
parameters: livereload: yes