Search code examples
ddub

How do I convert dub.sdl into dub.json?


Since MonoD doesn't let me add use dub libraries natively I need to write dub.json myself. A good start would be to use an already existing template produced by e.g. dub init, but unfortunately this command produces a project that uses a competing dub.sdl and for some reason I cannot find any option to tell it to create a dub.json instead.

How do I convert a dub.sdl into dub.json so I can use it with MonoD?


Solution

  • As said by dub init --help, there is an option for generating JSON file instead of SDL:

    -f --format=VALUE

    Sets the format to use for the package description file. Possible values: sdl, json

    So, try dub init --format=json.