mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Add ignoreUnknown to project nodes
This commit is contained in:
parent
bcd5fab33c
commit
c50922e90c
1 changed files with 9 additions and 4 deletions
|
|
@ -11,6 +11,11 @@ use rbx_tree::RbxValue;
|
|||
|
||||
pub static PROJECT_FILENAME: &'static str = "roblox-project.json";
|
||||
|
||||
// Serde is silly,
|
||||
const fn yeah() -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
enum SourceProjectNode {
|
||||
|
|
@ -21,8 +26,8 @@ enum SourceProjectNode {
|
|||
#[serde(rename = "$properties", default = "HashMap::new")]
|
||||
properties: HashMap<String, RbxValue>,
|
||||
|
||||
// #[serde(rename = "$ignoreUnknown", default = "false")]
|
||||
// ignore_unknown: bool,
|
||||
#[serde(rename = "$ignoreUnknown", default = "yeah")]
|
||||
ignore_unknown: bool,
|
||||
|
||||
#[serde(flatten)]
|
||||
children: HashMap<String, SourceProjectNode>,
|
||||
|
|
@ -36,7 +41,7 @@ enum SourceProjectNode {
|
|||
impl SourceProjectNode {
|
||||
pub fn into_project_node(self, project_file_location: &Path) -> ProjectNode {
|
||||
match self {
|
||||
SourceProjectNode::Instance { class_name, mut children, properties } => {
|
||||
SourceProjectNode::Instance { class_name, mut children, properties, .. } => {
|
||||
let mut new_children = HashMap::new();
|
||||
|
||||
for (node_name, node) in children.drain() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue