-
Notifications
You must be signed in to change notification settings - Fork 192
Expand file tree
/
Copy pathcreate.rs
More file actions
25 lines (19 loc) · 798 Bytes
/
create.rs
File metadata and controls
25 lines (19 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//! Project scaffolding command (Category B: JS Script Command).
use std::process::ExitStatus;
use vite_path::AbsolutePathBuf;
use crate::{error::Error, js_executor::JsExecutor};
/// Execute the `create` command by delegating to the bundled JavaScript implementation.
pub async fn execute(cwd: AbsolutePathBuf, args: &[String]) -> Result<ExitStatus, Error> {
let mut executor = JsExecutor::new(None);
// Execute the bundled JS script with the "create" command
// The JS script handles all argument parsing, template discovery, and execution
executor.execute_cli_script("index.js", "create", args, &cwd).await
}
#[cfg(test)]
mod tests {
#[test]
fn test_create_command_module_exists() {
// Basic test to ensure the module compiles
assert!(true);
}
}