pub fn extract_scripts<'a>(
_path: &Path,
_content: &'a str,
) -> Result<Vec<ExtractedScript<'a>>, ExtractorError>Expand description
Extract scripts from a framework file, auto-detecting the framework by extension.
§Arguments
path- The file path (used to determine framework by extension)content- The file content
§Returns
A vector of extracted scripts, or an error if extraction fails.
Currently, no framework-specific extractors are supported. This function returns an empty vector for all file types.
§Example
use fob_graph::analysis::extractors::extract_scripts;
use std::path::Path;
let path = Path::new("component.js");
let content = "const x = 1;";
let scripts = extract_scripts(path, content)?;
assert_eq!(scripts.len(), 0);