Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Jquery Bundle Laravel Package

evheniy/jquery-bundle

Symfony2 bundle that provides jQuery from Google CDN or a local path, with configurable version, CDN domain, HTML5/legacy script tags, and async loading. Install via Composer and register JqueryBundle in AppKernel.

View on GitHub
Deep Wiki
Context7

JqueryBundle

knpbundles.com

Latest Stable Version Total Downloads Latest Unstable Version License

Build Status Coverage Status Scrutinizer Code Quality Build Status

This bundle provides jQuery in Symfony2 from CDN ajax.googleapis.com

Documentation

You can change jQuery version:

jquery:
    version: 1.11.3

Default value: 1.11.3

You can set jQuery local version (it helps if Google CDN doesn't work):

jquery:
    local: '@AppBundle/Resources/public/js/jquery-1.11.3.min.js'

Default value: '@JqueryBundle/Resources/public/js/jquery-1.11.3.min.js'

You can use old html version:

jquery:
    html5: false

Default value: true. If false script will be with type="text/javascript"

You can use async loading:

jquery:
    async: true

Default value: false. If true script will be with async="async"

You can use local CDN (domain):

jquery:
    cdn: cdn.site.com

Default value is empty

Installation

$ composer require evheniy/jquery-bundle "1.*"

Or add to composer.json

"evheniy/jquery-bundle": "1.*"

AppKernel:

public function registerBundles()
    {
        $bundles = array(
            ...
            new Evheniy\JqueryBundle\JqueryBundle(),
        );
        ...

config.yml:

#JqueryBundle
jquery: ~

or

#JqueryBundle
jquery:
    version: 1.11.3
    local: '@AppBundle/Resources/public/js/jquery-1.11.3.min.js'
    html5: true
    async: false
    cdn: cdn.site.com

And Assetic Configuration in config.yml:

#Assetic Configuration
assetic:
    bundles: [ JqueryBundle ]

Add this string to your layout

{% include "JqueryBundle:Jquery:jquery.html.twig" %}

The last step

app/console assetic:dump --env=prod --no-debug

License

This bundle is under the MIT license.

Документация на русском языке

Jquery and Google Hosted Libraries

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
unabomber/timezone
delatbabel/contacts
astritzeqiri/g-recaptcha
kevinongko/laravel-genode
developeruz/laravel-analytics
robbiep/afterthedeadline
frankkessler/incontact-laravel-oauth2-rest
jlxh/laravel-userlog
davidmgilo/timetables
qylinfly/role-permission
reflect-digital/conduit
takashato/laravel-vietqr
aitor24/laralang
kraenzle-ritter/entity-relations
dindigital/din-image
pomirleanu/image-colors
sawmainek/laravel-api-generator
delatbabel/jsonresponses
mouhamedfd/permissions-generator
eduplus/qr