Refactor script class handling and improve imports in git.rs and ref_properties.rs

- Moved the `is_script_class` function to the `snapshot` module for better organization and reusability.
- Updated imports in `git.rs` and `ref_properties.rs` to reflect the new location of `is_script_class`, enhancing code clarity and maintainability.

These changes aim to streamline script class management and improve the overall structure of the codebase.
This commit is contained in:
Joe 2026-02-28 11:36:15 -06:00
parent a68e0ab7c6
commit d4b390a3ec
2 changed files with 5 additions and 11 deletions

View file

@ -10,13 +10,10 @@ use std::{
use rbx_dom_weak::types::Ref;
use sha1::{Digest, Sha1};
use crate::{snapshot::RojoTree, web::interface::GitMetadata};
const SCRIPT_CLASSES: &[&str] = &["Script", "LocalScript", "ModuleScript"];
fn is_script_class(class: &str) -> bool {
SCRIPT_CLASSES.contains(&class)
}
use crate::{
snapshot::{is_script_class, RojoTree},
web::interface::GitMetadata,
};
pub fn git_repo_root(project_root: &Path) -> Option<PathBuf> {
let output = Command::new("git")