Skip to content

modify dump command to generate export call in js routes file. #479

@alexbaron

Description

@alexbaron

is it possible to update the command DumpCommand to be able to generate the js routes content as follow :

const routesConfig = {
    "base_url": "",
    "routes":
    {
        "route name": {
          ....
        }
    },
    "prefix": "",
    "host": "localhost",
    "port": "", "scheme":
        "http",
    "locale": ""
};

export default routesConfig;

I tried to use callback without success.

My goal is to be able to use fosjsrouting in assetmapper as follow :

import Routing from 'fos-routing';
import routerConfig from './routing/fos_js_routes.js';
Routing.setData(routerConfig);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions