Nimble Package Maestros

    play-routes-to-json

    0.1.0 • Public • Published

    play-routes-to-json NPM version Build Status

    Convert your play routes file to a nicer json format

    See play-routes-from-json to generate a routes file from your new JSON format.

    Install

    $ npm install --save play-routes-to-json

    Usage

    var routesToJSON = require('play-routes-to-json');
    var fs = require('fs');
    fs.readFile('conf/routes', function(err, data) {
      var parsed = routesToJSON(data);
      console.log(JSON.parse(parsed).routes);
      //=> { type: 'GET', path: '/path/to/action', controller: '@controllers.handleAction()' }
    });

    License

    MIT © Charlie Dowler

    Install

    npm i play-routes-to-json

    DownloadsWeekly Downloads

    3

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • charliedowler