Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] feat: Add TaskDefinition.{files,output,clean} #142

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
17 changes: 17 additions & 0 deletions src/deno_json/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,13 +449,27 @@ pub struct WorkspaceConfig {
#[error("Failed to parse \"patch\" configuration.")]
pub struct PatchConfigParseError(#[source] serde_json::Error);


#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
pub enum TaskCleanOption {
True,
False,
IfFileDeleted
}

#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
pub struct TaskDefinition {
pub command: String,
#[serde(default)]
pub dependencies: Vec<String>,
#[serde(default)]
pub description: Option<String>,
#[serde(default)]
pub files: Option<Vec<String>>,
#[serde(default)]
pub output: Option<Vec<String>>,
#[serde(default)]
pub clean: Option<TaskCleanOption>
}

#[cfg(test)]
Expand All @@ -465,6 +479,9 @@ impl From<&str> for TaskDefinition {
command: value.to_string(),
dependencies: vec![],
description: None,
files: None,
output: None,
clean: None,
}
}
}
Expand Down
Loading