定制 evheniy/jquery-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

evheniy/jquery-bundle

最新稳定版本:1.5.1

Composer 安装命令:

composer require evheniy/jquery-bundle

包简介

The JqueryBundle adds the ability to add latest jQuery to your application.

README 文档

README

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

统计信息

  • 总下载量: 25.17k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 2
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-05-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固