2017 © Pedro Peláez
 

yii2-extension yii2-cdn

A CDN extension for Yii2.

image

yiizh/yii2-cdn

A CDN extension for Yii2.

  • Thursday, November 10, 2016
  • by zhangdi
  • Repository
  • 1 Watchers
  • 3 Stars
  • 109 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 2 % Grown

The README.md

yii2-cdn

Packagist Packagist GitHub tag, (*1)

A CDN extension for Yii2., (*2)

You can make your assets using CDN resources without changing your asset bundle code., (*3)

Install

The preferred way to install this extension is through composer., (*4)

Either run, (*5)

php composer.phar require --prefer-dist yiizh/yii2-cdn "*"

or add, (*6)

"yiizh/yii2-cdn": "*"

to the require section of your composer.json file., (*7)

Usage

1. Add a component

Add the following code to you config file @app/config/main.php:, (*8)

// ...
'components' => [
    'cdn' => [
        'class' => 'yiizh\cdn\CDN',
        'assets' => [
            [
                'class' => 'yii\web\JqueryAsset',
                'js' => [
                    'http://cdn.bootcss.com/jquery/2.2.4/jquery.min.js'
                ]
            ],
            [
                'class' => 'yii\bootstrap\BootstrapAsset',
                'css' => [
                    'http://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css'
                ]
            ],
        ]
    ],
]
// ...

2. Add cdn to bootstrap

Add the following code to you config file @app/config/main.php:, (*9)

// ...
'bootstrap' => ['log', 'cdn'],
// ...

The Versions

10/11 2016

dev-master

9999999-dev https://github.com/yiizh/yii2-cdn

A CDN extension for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 cdn assets

10/11 2016

0.1.1

0.1.1.0 https://github.com/yiizh/yii2-cdn

A CDN extension for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 cdn assets

10/11 2016

0.1.0

0.1.0.0 https://github.com/yiizh/yii2-cdn

A CDN extension for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 cdn assets