benmacha / mousetracker
Symfony Mouse Tracker
Installs: 51
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 1
Open Issues: 0
Language:JavaScript
Type:symfony-bundle
Requires
- php: >=5.3.9
- leafo/scssphp: ^0.4.0
- patchwork/jsqueeze: ^2.0
- symfony/symfony: 2.8.*
This package is auto-updated.
Last update: 2024-11-17 21:50:53 UTC
README
By D'Ali Ben Macha contact@benmacha.tn https://dali.benmacha.tn
Installation
Add the benmacha/mousetracker
package to your require
section in the composer.json
file.
$ composer require benmacha/mousetracker dev-master
Add the MouseTrackerBundle to your application's kernel:
<?php public function registerBundles() { $bundles = array( // ... new benmacha\mousetracker\TrackerBundle(), // ... ); ... }
Configure the Tracker
in your routing.yml
:
mouse_tracker: resource: "@TrackerBundle/Controller/" type: annotation prefix: /tracker
Configure the Tracker
in your config.yml
:
imports: - { resource: "@TrackerBundle/Resources/config/services.yml" } twig: globals: mousetrackerService: @twig_tracker assetic: filters: scssphp: formatter: 'Leafo\ScssPhp\Formatter\Compressed' jsqueeze: ~
Create Table:
$ php app/console doctrine:schema:update --force
Dump js and css file
$ php app/console assetic:dump
Usage
Configure the TrackerService
before the end of Body tag in your *.html.twig
page:
<script> /* Javascript Code */ </script> {{ mousetrackerService.build() }} <script> /* Javascript Code */ </script> </body> </html>