update examples so they can compile again, and make them visible to dub
This commit is contained in:
parent
b44f96bd9f
commit
4680e1b5b2
11
dub.json
11
dub.json
|
@ -7,5 +7,14 @@
|
|||
"license": "Boost 1.0",
|
||||
"dependencies": { "tinyendian" : { "version" : "~>0.1.0" } },
|
||||
"homepage": "https://github.com/dlang-community/D-YAML",
|
||||
"copyright": "Copyright © 2011-2014, Ferdinand Majerech"
|
||||
"copyright": "Copyright © 2011-2014, Ferdinand Majerech",
|
||||
"subPackages": [
|
||||
"examples/constructor",
|
||||
"examples/getting_started",
|
||||
"examples/representer",
|
||||
"examples/resolver",
|
||||
"examples/yaml_bench",
|
||||
"examples/yaml_gen",
|
||||
"examples/yaml_stats"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"mainSourceFile": "main.d",
|
||||
"dependencies":
|
||||
{
|
||||
"dyaml": { "version" : "~>0.5.0"},
|
||||
},
|
||||
"dyaml": { "version" : "*"}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import std.stdio;
|
||||
import std.string;
|
||||
import dyaml.all;
|
||||
import dyaml;
|
||||
|
||||
struct Color
|
||||
{
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"mainSourceFile": "main.d",
|
||||
"dependencies":
|
||||
{
|
||||
"dyaml": { "version" : "~>0.5.0" },
|
||||
},
|
||||
"dyaml": { "version" : "*" }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import std.stdio;
|
||||
import dyaml.all;
|
||||
import dyaml;
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"mainSourceFile": "main.d",
|
||||
"dependencies":
|
||||
{
|
||||
"dyaml": { "version" : "~>0.5.0" },
|
||||
},
|
||||
"dyaml": { "version" : "*" }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import std.stdio;
|
||||
import dyaml.all;
|
||||
import dyaml;
|
||||
|
||||
struct Color
|
||||
{
|
||||
|
@ -16,7 +16,7 @@ struct Color
|
|||
}
|
||||
}
|
||||
|
||||
Node representColor(ref Node node, Representer representer)
|
||||
Node representColor(ref Node node, Representer representer) @safe
|
||||
{
|
||||
//The node is guaranteed to be Color as we add representer for Color.
|
||||
Color color = node.as!Color;
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"mainSourceFile": "main.d",
|
||||
"dependencies":
|
||||
{
|
||||
"dyaml": { "version" : "~>0.5.0" },
|
||||
},
|
||||
"dyaml": { "version" : "*" }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import std.stdio;
|
||||
import std.string;
|
||||
import dyaml.all;
|
||||
import dyaml;
|
||||
|
||||
struct Color
|
||||
{
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
{
|
||||
"name": "yaml_bench",
|
||||
"name": "benchmark",
|
||||
"targetType": "executable",
|
||||
"sourceFiles": ["yaml_bench.d"],
|
||||
"mainSourceFile": "yaml_bench.d",
|
||||
"dependencies":
|
||||
{
|
||||
"dyaml": { "version" : "~>0.5.0" },
|
||||
},
|
||||
"buildTypes":
|
||||
{
|
||||
"debug": { "buildOptions": ["debugMode", "debugInfoC"] },
|
||||
"release": { "buildOptions": ["releaseMode", "optimize", "inline", "noBoundsCheck"] },
|
||||
"profile": { "buildOptions": ["releaseMode", "optimize", "noBoundsCheck", "debugInfoC"] }
|
||||
"dyaml": { "version" : "*" }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,27 +6,27 @@ import std.conv;
|
|||
import std.datetime;
|
||||
import std.stdio;
|
||||
import std.string;
|
||||
import dyaml.all;
|
||||
import dyaml;
|
||||
|
||||
///Print help information.
|
||||
void help()
|
||||
{
|
||||
string help =
|
||||
"D:YAML benchmark\n"
|
||||
"Copyright (C) 2011-2014 Ferdinand Majerech\n"
|
||||
"Usage: yaml_bench [OPTION ...] [YAML_FILE]\n"
|
||||
"\n"
|
||||
"Loads and optionally extracts data and/or dumps a YAML file.\n"
|
||||
"\n"
|
||||
"Available options:\n"
|
||||
" -h --help Show this help information.\n"
|
||||
" -g --get Extract data from the file (using Node.as()).\n"
|
||||
" -d --dump Dump the loaded data (to YAML_FILE.dump).\n"
|
||||
" -r --runs=NUM Repeat parsing the file NUM times.\n"
|
||||
" --reload Reload the file from the diskl on every repeat\n"
|
||||
" By default, the file is loaded to memory once\n"
|
||||
" and repeatedly parsed from memory.\n"
|
||||
" -s --scan-only Do not execute the entire parsing process, only\n"
|
||||
"D:YAML benchmark\n"~
|
||||
"Copyright (C) 2011-2014 Ferdinand Majerech\n"~
|
||||
"Usage: yaml_bench [OPTION ...] [YAML_FILE]\n"~
|
||||
"\n"~
|
||||
"Loads and optionally extracts data and/or dumps a YAML file.\n"~
|
||||
"\n"~
|
||||
"Available options:\n"~
|
||||
" -h --help Show this help information.\n"~
|
||||
" -g --get Extract data from the file (using Node.as()).\n"~
|
||||
" -d --dump Dump the loaded data (to YAML_FILE.dump).\n"~
|
||||
" -r --runs=NUM Repeat parsing the file NUM times.\n"~
|
||||
" --reload Reload the file from the diskl on every repeat\n"~
|
||||
" By default, the file is loaded to memory once\n"~
|
||||
" and repeatedly parsed from memory.\n"~
|
||||
" -s --scan-only Do not execute the entire parsing process, only\n"~
|
||||
" scanning. Overrides '--dump'.\n";
|
||||
writeln(help);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"mainSourceFile": "yaml_gen.d",
|
||||
"dependencies":
|
||||
{
|
||||
"dyaml": { "version" : "~>0.5.0" },
|
||||
},
|
||||
"dyaml": { "version" : "*" }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import std.math;
|
|||
import std.random;
|
||||
import std.stdio;
|
||||
import std.string;
|
||||
import dyaml.all;
|
||||
import dyaml;
|
||||
|
||||
|
||||
Node config;
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"mainSourceFile": "yaml_stats.d",
|
||||
"dependencies":
|
||||
{
|
||||
"dyaml": { "version" : "~>0.5.0" },
|
||||
},
|
||||
"dyaml": { "version" : "*" }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
import std.stdio;
|
||||
import std.string;
|
||||
import dyaml.all;
|
||||
import dyaml;
|
||||
|
||||
|
||||
///Collects statistics about a YAML document and returns them as string.
|
||||
|
|
Loading…
Reference in a new issue