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 eg 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?
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
.
DUB package of DUB is good for you.
It contains first hand library code it takes to
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).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.