承接 lpinc/lpi-asset-loader 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

lpinc/lpi-asset-loader

最新稳定版本:0.1.10

Composer 安装命令:

composer require lpinc/lpi-asset-loader

包简介

LpiAssetLoader is a zend framework module that can be used in zf2 or zf3 layouts to load front end asset javascript and css files and frameworks

README 文档

README

Created by LPinc

Introduction

LpiAssetLoader is a zend framework - ZF2 and ZF3 - module that helps configure the loading of front-end custom, bower, or npm javascript and css files and assets.

This module can be especially handy if you load AMD javascript modules in your layouts or view scripts.

Installation

via github

To install LpiAssetLoader, simply recursively clone this repository (git clone --recursive) into your ZF2 or ZF3 modules directory.

Or with composer

  1. Add this project and LpiAssetLoader in your composer.json:

    "require": {
        "lpinc/lpi-asset-loader": "~0.1"
    }
  2. Now tell composer to download ZfcUser by running the command:

    $ php composer.phar update

Enable

Enable LpiAssetLoader in your config/application.config.php file.

Config Options

The LpiAssetLoader module has some options to help customize the basic functionality. After installing LpiAssetLoader, copy ./vendor/lpinc/lpi-asset-loader/config/lpiassetloader.global.php.dist to ./config/autoload/lpiassetloader.global.php and change the values as desired.

If you istalled dojo using nodejs npm, then a sample config might look like this:

$settings = array(
   'dojo_config_settings' => array(
      'async' => true,
      'parseOnLoad' => true
   ),
   'dojo_on' => true,
   'use_source' => true,
   'base_vendor_src_path' => '/node_modules/',
   'amd_vendor_modules' => array(
      'dojo' => 'dojo',
      'dijit' => 'dijit',
      'dojox' => 'dojox'
   )
);

return array(
   'lpi-asset-loader' => $settings
);

Example Uses:

To configue and intialize dojo in a zend framework view-layout file:

if (is_object($this->LpiAssetLoader)) {
   echo $this->LpiAssetLoader->getDojoConfig();
   echo $this->LpiAssetLoader->getDojoInitAssets();
}

To configue dojo with a custom module in a zend framework layout file:

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-02-26