Skip to content

Commit 61e86bf

Browse files
committed
FIXUP
1 parent 7eb2077 commit 61e86bf

62 files changed

Lines changed: 2217 additions & 647 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

crates/vite_package_manager/src/add.rs

Lines changed: 519 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
use std::{collections::HashMap, iter};
2+
3+
use crate::package_manager::{PackageManager, ResolveCommandResult, format_path_env};
4+
5+
impl PackageManager {
6+
/// Resolve the install command.
7+
pub fn resolve_install_command(&self, args: &Vec<String>) -> ResolveCommandResult {
8+
ResolveCommandResult {
9+
bin_path: self.bin_name.to_string(),
10+
args: iter::once("install")
11+
.chain(args.iter().map(String::as_str))
12+
.map(String::from)
13+
.collect(),
14+
envs: HashMap::from([("PATH".to_string(), format_path_env(self.get_bin_prefix()))]),
15+
}
16+
}
17+
}

crates/vite_package_manager/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
mod add;
12
mod config;
3+
mod install;
24
pub mod package;
35
pub mod package_manager;
46
mod request;

0 commit comments

Comments
 (0)