3

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?

Colonel Thirty Two
  • 23,953
  • 8
  • 45
  • 85
Adam Ryczkowski
  • 7,592
  • 13
  • 42
  • 68

2 Answers2

5

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.

Community
  • 1
  • 1
Max Alibaev
  • 681
  • 7
  • 17
1

DUB package of DUB is good for you.


It contains first hand library code it takes to

  • load,
  • manipulate and
  • save

packages (be it in SDL or JSON format).


Of course you've got to get your hand dirty to do the appropriate plumbing (writing a package converter command line utility in your case for instance).

menjaraz
  • 7,551
  • 4
  • 41
  • 81