2017 © Pedro Peláez
 

symfony-bundle jsconfiguration-bundle

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

image

tempo/jsconfiguration-bundle

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

  • Thursday, June 2, 2016
  • by Shine-neko
  • Repository
  • 3 Watchers
  • 1 Stars
  • 201 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

TempoJsConfigurationBundle

This bundle allows you to expose configuration in your JavaScript code., (*1)

Installation

Require tempo/jsconfiguration-bundle into your composer.json file:, (*2)

``` json { "require": { "tempo-project/jsconfiguration-bundle": "dev-master" } }, (*3)


Register the bundle in `app/AppKernel.php`: ``` php // app/AppKernel.php public function registerBundles() { return array( // ... new Tempo\Bundle\JsConfigurationBundle\TempoJsConfigurationBundle(), ); }

Publish assets:, (*4)

$ 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:, (*5)

``` yaml, (*6)

app/config/config.yml

tempo_js_configuration: config_to_expose: [mopa_bootstrap.form.show_legend], (*7)


Add these two lines in your layout:

```, (*8)

Testing

Setup the test suite using Composer:, (*9)

$ composer install --dev, (*10)

Run it using PHPUnit:, (*11)

$ phpunit, (*12)

Resources

The Versions

02/06 2016

dev-master

9999999-dev

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

  Sources   Download

MIT

The Requires

 

The Development Requires

configuration javascript symfony

02/06 2016

0.5

0.5.0.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

configuration javascript symfony