2017 © Pedro Peláez
 

library jquery

jQuery for AsseticImporter

image

apnet/jquery

jQuery for AsseticImporter

  • Friday, July 8, 2016
  • by covex-nn
  • Repository
  • 2 Watchers
  • 0 Stars
  • 873 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 1 % Grown

The README.md

jQuery Assets Importer

Installation

Add requirements to composer.json:, (*1)

``` json { "require" : { "apnet/jquery" : "~2.2" } }, (*2)


Configurations -------------- Register `ApnetAsseticImporterBundle` bundle in the `AppKernel.php` file ``` php // ...other bundles ... $bundles[] = new Apnet\AsseticImporterBundle\ApnetAsseticImporterBundle();

Add jQuery importer to services.yml, (*3)

``` yml services: apnet.assetic.importer.jquery: parent: assetic.importer_path arguments: - %kernel.root_dir%/../vendor/apnet/jquery/app/Resources/assets/dist - jquery tags: - { name: apnet.assetic.config_mapper }, (*4)


Twig ---- To include jQuery into Twig template use **imported_asset** function: ``` html <script type="text/javascript" src="{{ imported_asset('jquery/jquery.min.js') }}"></script>

The Versions