forked from rojo-rbx/rojo
Add a new syncRules field project files to allow users to specify middleware to use for files (#813)
This commit is contained in:
@@ -8,7 +8,7 @@ use std::{
|
||||
use serde::{Deserialize, Serialize};
|
||||
use thiserror::Error;
|
||||
|
||||
use crate::{glob::Glob, resolution::UnresolvedValue};
|
||||
use crate::{glob::Glob, resolution::UnresolvedValue, snapshot::SyncRule};
|
||||
|
||||
static PROJECT_FILENAME: &str = "default.project.json";
|
||||
|
||||
@@ -84,6 +84,12 @@ pub struct Project {
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
pub glob_ignore_paths: Vec<Glob>,
|
||||
|
||||
/// A list of mappings of globs to syncing rules. If a file matches a glob,
|
||||
/// it will be 'transformed' into an Instance following the rule provided.
|
||||
/// Globs are relative to the folder the project file is in.
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
pub sync_rules: Vec<SyncRule>,
|
||||
|
||||
/// The path to the file that this project came from. Relative paths in the
|
||||
/// project should be considered relative to the parent of this field, also
|
||||
/// given by `Project::folder_location`.
|
||||
|
||||
Reference in New Issue
Block a user