承接 tempo/jsconfiguration-bundle 相关项目开发

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

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

tempo/jsconfiguration-bundle

最新稳定版本:0.5

Composer 安装命令:

composer require tempo/jsconfiguration-bundle

包简介

A pretty nice way to expose your configuration to your JavaScript.

README 文档

README

This bundle allows you to expose configuration in your JavaScript code.

Installation

Require tempo/jsconfiguration-bundle into your composer.json file:

{
    "require": {
        "tempo-project/jsconfiguration-bundle": "dev-master"
    }
}

Register the bundle in app/AppKernel.php:

// app/AppKernel.php
public function registerBundles()
{
    return array(
        // ...
        new Tempo\Bundle\JsConfigurationBundle\TempoJsConfigurationBundle(),
    );
}

Publish assets:

$ php app/console tempo:js-configuration:dump
$ php app/console assets:install --symlink web

Usage

Moreover, you can configure a list of configuration to expose in app/config/config.yml:

# app/config/config.yml

tempo_js_configuration:
  config_to_expose: [mopa_bootstrap.form.show_legend]

Add these two lines in your layout:

<script src="{{ asset('bundles/tempojsconfiguration/js/configuration.js') }}"></script>
<script src="{{ asset('js/tempo_configuration.js') }}"></script>

Testing

Setup the test suite using Composer:

$ composer install --dev

Run it using PHPUnit:

$ phpunit

Resources

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-05