mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 22:11:38 +00:00
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:
parent
a68e0ab7c6
commit
d4b390a3ec
2 changed files with 5 additions and 11 deletions
11
src/git.rs
11
src/git.rs
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue