2017 © Pedro Peláez
 

library jsrouting-provider

javascript routing provider for the silex framework

image

rootlogin/jsrouting-provider

javascript routing provider for the silex framework

  • Saturday, February 13, 2016
  • by rootlogin
  • Repository
  • 1 Watchers
  • 4 Stars
  • 4,857 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 2 Open issues
  • 3 Versions
  • 3 % Grown

The README.md

Silex JSRouting Provider

The JSRouting Provider is a silex routing provider for javascript, that exposes routes to a javascript file. Then you can generate routes for use with javascript frameworks like AngularJS., (*1)

Build Status Total Downloads Latest Stable Version Scrutinizer Code Quality, (*2)

Installation

Add the provider to your composer.json ``` {.json} { "requires": { "rootlogin/jsrouting-provider": "~1.0" } }, (*3)


Register the provider in your silex application: ``` {.php} $app->register(new rootLogin\JSRoutingProvider\Provider\SilexJSRoutingServiceProvider(), array( "jsrouting.base_url" => "/", "jsrouting.exposed_routes" => array("routeA", "routeB") ));

Set the route option expose to true. ``` {.php} $controllers->get("/hello", function() { return "hello world"! })->bind("hello")->getRoute()->setOption("expose",true);, (*4)


Include and use it in your frontend like this. ``` {.html}

Console

If you want to use the console commands please install at least saxulum/saxulum-console. It will be automatically activated after you registered the provider., (*5)

Available Commands

  • jsrouting:dump: This dumps the router with the known routes (buggy, ATM);
  • jsrouting:dump:router.js: This only dumps the router.js. You need to add the routes manually.

Run the tests

Go to the base directory of the jsrouting-provider. Do a composer install and enter vendor/bin/phpunit., (*6)

Run the javascript tests

Do a npm install and enter node_modules/.bin/gulp test. Or if you have installed gulp globally enter gulp test., (*7)

Contribution

Pull request are welcome. Or if you can't or want code you can also contribute by opening a ticket if you see something is wrong., (*8)

Warning

This project is in early development stages. No warranty if it kills your kittens or starts a nuclear war ;), (*9)

The Versions

13/02 2016

dev-master

9999999-dev https://rootlogin.ch

javascript routing provider for the silex framework

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

javascript silex routing

13/02 2016

v1.0.1

1.0.1.0 https://rootlogin.ch

javascript routing provider for the silex framework

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

javascript silex routing

09/02 2016

v1.0.0

1.0.0.0 https://rootlogin.ch

javascript routing provider for the silex framework

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

javascript silex routing