dconfig 0.0.2
A JSON based config management library for D programming language.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
dconfig
what is dconfig?
dconfig is a library for D programming language. This library can easily manage D's variables and values writteln in JSON.
usage
Add dependency for dconfig to your dub.sdl
(dub.json)
example
import dconfig;
void main() {
// prepare config class
class Test {
mixin HandleConfig;
this() { this.initializeConfig(); }
@config("test.json") int x;
}
// class instance is auto assigned JSON value
import std.file : write;
write("test.json", `{"x": 334}`);
auto test = new Test;
assert(test.x == 334);
// you can reload while running
write("test.json", `{"x": 810}`);
ConfigManager().load();
assert(test.x == 810);
}
- Registered by Kentaro Kakinuma
- 0.0.2 released 6 years ago
- Sobaya007/dconfig
- MIT
- Copyright © 2018, sobaya
- Authors:
- Dependencies:
- none
- Versions:
-
0.0.5 2019-Jul-06 0.0.4 2019-Jul-06 0.0.3 2019-Apr-08 0.0.2 2018-Jun-09 0.0.1 2018-May-27 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
112 downloads total
-
- Score:
- 0.0
- Short URL:
- dconfig.dub.pm