forked from mirror/Riven
1
0
Fork 0

move generated classes to src

users/mingwei/surf v0.0.2
Mingwei Samuel 2019-10-20 19:28:29 -07:00
parent c7b3cab8b0
commit 02e9c2786a
10 changed files with 17 additions and 17 deletions

View File

@ -2,12 +2,11 @@
name = "riven"
version = "0.0.2"
authors = ["Mingwei Samuel <mingwei.samuel@gmail.com>"]
repository = "https://github.com/MingweiSamuel/Riven"
description = "Riot API Library (WIP)"
license = "LGPL-3.0"
edition = "2018"
exclude = [
".gitignore"
]
include = [ "src/**/*" ]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -1,7 +1,7 @@

// This file is automatically generated.
// Do not directly edit.
// Generated on 2019-10-20T06:19:43.696Z
// Generated on 2019-10-21T02:25:22.691Z
use std::fmt;
use num_derive;

View File

@ -1,4 +1,5 @@
mod region;
mod champion;
pub use region::*;
pub use crate::champion::*;
pub use champion::*;

View File

@ -1,7 +1,7 @@
// This file is automatically generated.
// Do not directly edit.
// Generated on 2019-10-20T06:19:43.812Z
// Generated on 2019-10-21T02:25:22.768Z
// http://www.mingweisamuel.com/riotapi-schema/tool/
// Version 0c74167e0eaaeb6de1c7e8219fecaabcf8386d1f

View File

@ -1,7 +1,7 @@
// This file is automatically generated.
// Do not directly edit.
// Generated on 2019-10-20T06:19:43.832Z
// Generated on 2019-10-21T02:25:22.772Z
// http://www.mingweisamuel.com/riotapi-schema/tool/
// Version 0c74167e0eaaeb6de1c7e8219fecaabcf8386d1f

View File

@ -1,7 +1,9 @@
include!("../srcgen/mod.rs");
mod dto;
pub use dto::*;
mod endpoints;
pub use endpoints::*;
pub mod consts;
mod riot_api_config;

View File

@ -54,7 +54,7 @@ downloadFilesPromise.then(() => glob.promise("**/*" + suffix, { ignore: ["**/nod
console.error(`Error thrown while running "${file}":`, e);
}
})
.then(output => fs.writeFileAsync(file.slice(0, -suffix.length), output, "utf8"))
.then(output => fs.writeFileAsync("../src/" + file.slice(0, -suffix.length), output, "utf8"))
)
))
.catch(console.error);

View File

@ -1,7 +0,0 @@
mod champion;
mod dto;
pub use dto::*;
mod endpoints;
pub use endpoints::*;

View File

@ -59,6 +59,11 @@ macro_rules! rassert {
if $x { Ok(()) } else { Err(stringify!($x)) }?
}
};
( $x:expr, $format:expr $(, $arg:expr)* ) => {
{
if $x { Ok(()) } else { Err( format!($format, $( $arg )* ) ) }?
}
};
}
#[macro_export]