Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,17 @@ jobs:
- uses: oxc-project/setup-node@fdbf0dfd334c4e6d56ceeb77d91c76339c2a0885 # v1.0.4

- name: Build self
run: cargo build --bin vt
run: pnpm bootstrap-cli

- name: Run self
run: ./target/debug/vt run -r build
run: vite run -r build

- name: Print help for built-in commands
run: |
export PATH="$PATH:$(pwd)/packages/cli/bin"
vite -h
vite run -h
vite lint -h
# FIXME(#246): Global CLI fails to run `vite lint`
# vite lint -h
vite test -h
vite build -h
vite fmt -h
Expand Down
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions crates/vite_task/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ publish = false
readme = "README.md"
rust-version.workspace = true

[[bin]]
name = "vt"
path = "src/main.rs"

[lints]
workspace = true

Expand Down
6 changes: 3 additions & 3 deletions crates/vite_task/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ use vite_str::Str;
pub use workspace::*;

use crate::{
ResolveCommandResult,
cmd::TaskParsedCommand,
collections::{HashMap, HashSet},
config::name::TaskName,
execute::TaskEnvs,
types::ResolveCommandResult,
};

#[derive(Encode, Decode, Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Diff)]
Expand Down Expand Up @@ -141,7 +141,7 @@ impl ResolvedTask {

#[tracing::instrument(skip(workspace, resolve_command, args))]
/// Resolve a built-in task, like `vite lint`, `vite build`
pub(crate) async fn resolve_from_builtin<
pub async fn resolve_from_builtin<
Resolved: Future<Output = Result<ResolveCommandResult, Error>>,
ResolveFn: Fn() -> Resolved,
>(
Expand All @@ -161,7 +161,7 @@ impl ResolvedTask {
)
}

pub(crate) fn resolve_from_builtin_with_command_result(
pub fn resolve_from_builtin_with_command_result(
workspace: &Workspace,
task_name: &str,
args: impl Iterator<Item = impl AsRef<str>> + Clone,
Expand Down
4 changes: 4 additions & 0 deletions crates/vite_task/src/config/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ impl Workspace {
&self.task_cache.path
}

pub const fn root_dir(&self) -> &AbsolutePathBuf {
&self.root_dir
}

pub async fn unload(self) -> Result<(), Error> {
tracing::debug!("Saving task cache {}", self.root_dir.as_path().display());
self.task_cache.save().await?;
Expand Down
Loading
Loading