forked from rojo-rbx/rojo
Don't serialize emitLegacyScripts if it's None (#835)
This commit is contained in:
@@ -8,9 +8,7 @@ use std::{
|
|||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
||||||
use crate::{
|
use crate::{glob::Glob, resolution::UnresolvedValue};
|
||||||
glob::Glob, resolution::UnresolvedValue, snapshot_middleware::emit_legacy_scripts_default,
|
|
||||||
};
|
|
||||||
|
|
||||||
static PROJECT_FILENAME: &str = "default.project.json";
|
static PROJECT_FILENAME: &str = "default.project.json";
|
||||||
|
|
||||||
@@ -75,12 +73,10 @@ pub struct Project {
|
|||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub serve_address: Option<IpAddr>,
|
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.
|
/// Determines if Rojo should emit scripts with the appropriate `RunContext`
|
||||||
/// Or, if rojo should keep the legacy behavior of emitting LocalScripts and Scripts with legacy Runcontext
|
/// for `*.client.lua` and `*.server.lua` files in the project instead of
|
||||||
#[serde(
|
/// using `Script` and `LocalScript` Instances.
|
||||||
default = "emit_legacy_scripts_default",
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
skip_serializing_if = "Option::is_none"
|
|
||||||
)]
|
|
||||||
pub emit_legacy_scripts: Option<bool>,
|
pub emit_legacy_scripts: Option<bool>,
|
||||||
|
|
||||||
/// A list of globs, relative to the folder the project file is in, that
|
/// A list of globs, relative to the folder the project file is in, that
|
||||||
|
|||||||
Reference in New Issue
Block a user