Skip to content

Commit

Permalink
Don't serialize emitLegacyScripts if it's None (#835)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dekkonot authored Jan 16, 2024
1 parent b12ce47 commit c7173ac
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ use std::{
use serde::{Deserialize, Serialize};
use thiserror::Error;

use crate::{
glob::Glob, resolution::UnresolvedValue, snapshot_middleware::emit_legacy_scripts_default,
};
use crate::{glob::Glob, resolution::UnresolvedValue};

static PROJECT_FILENAME: &str = "default.project.json";

Expand Down Expand Up @@ -75,12 +73,10 @@ pub struct Project {
#[serde(skip_serializing_if = "Option::is_none")]
pub serve_address: Option<IpAddr>,

/// Determines if rojo should emit scripts with the appropriate `RunContext` for `*.client.lua` and `*.server.lua` files in the project.
/// Or, if rojo should keep the legacy behavior of emitting LocalScripts and Scripts with legacy Runcontext
#[serde(
default = "emit_legacy_scripts_default",
skip_serializing_if = "Option::is_none"
)]
/// Determines if Rojo should emit scripts with the appropriate `RunContext`
/// for `*.client.lua` and `*.server.lua` files in the project instead of
/// using `Script` and `LocalScript` Instances.
#[serde(skip_serializing_if = "Option::is_none")]
pub emit_legacy_scripts: Option<bool>,

/// A list of globs, relative to the folder the project file is in, that
Expand Down

0 comments on commit c7173ac

Please sign in to comment.