Unverified Commit bd663f91 authored by Niklas Mischkulnig's avatar Niklas Mischkulnig Committed by GitHub

Turbopack: add flag to switch between envs (#74135)

parent 2514e133
...@@ -3,7 +3,9 @@ use std::{ ...@@ -3,7 +3,9 @@ use std::{
path::{Path, PathBuf}, path::{Path, PathBuf},
}; };
use clap::{Args, Parser}; use clap::{Args, Parser, ValueEnum};
use serde::{Deserialize, Serialize};
use turbo_tasks::{NonLocalValue, TaskInput};
use turbopack_cli_utils::issue::IssueSeverityCliOption; use turbopack_cli_utils::issue::IssueSeverityCliOption;
#[derive(Debug, Parser)] #[derive(Debug, Parser)]
...@@ -23,6 +25,24 @@ impl Arguments { ...@@ -23,6 +25,24 @@ impl Arguments {
} }
} }
#[derive(
Copy,
Clone,
Debug,
ValueEnum,
PartialEq,
Eq,
Serialize,
Deserialize,
Hash,
TaskInput,
NonLocalValue,
)]
pub enum Target {
Browser,
Node,
}
#[derive(Debug, Args, Clone)] #[derive(Debug, Args, Clone)]
pub struct CommonArguments { pub struct CommonArguments {
/// The entrypoints of the project. Resolved relative to the project's /// The entrypoints of the project. Resolved relative to the project's
...@@ -61,6 +81,10 @@ pub struct CommonArguments { ...@@ -61,6 +81,10 @@ pub struct CommonArguments {
/// MB. /// MB.
#[clap(long)] #[clap(long)]
pub memory_limit: Option<usize>, pub memory_limit: Option<usize>,
/// Target
#[clap(long)]
pub target: Option<Target>,
} }
#[derive(Debug, Args)] #[derive(Debug, Args)]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment