mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 12:51:54 +00:00
Implement --drop (#14492)
Co-authored-by: dave caruso <me@paperdave.net>
This commit is contained in:
@@ -194,10 +194,11 @@ pub const Arguments = struct {
|
||||
};
|
||||
|
||||
const transpiler_params_ = [_]ParamType{
|
||||
clap.parseParam("--main-fields <STR>... Main fields to lookup in package.json. Defaults to --target dependent") catch unreachable,
|
||||
clap.parseParam("--main-fields <STR>... Main fields to lookup in package.json. Defaults to --target dependent") catch unreachable,
|
||||
clap.parseParam("--extension-order <STR>... Defaults to: .tsx,.ts,.jsx,.js,.json ") catch unreachable,
|
||||
clap.parseParam("--tsconfig-override <STR> Specify custom tsconfig.json. Default <d>$cwd<r>/tsconfig.json") catch unreachable,
|
||||
clap.parseParam("-d, --define <STR>... Substitute K:V while parsing, e.g. --define process.env.NODE_ENV:\"development\". Values are parsed as JSON.") catch unreachable,
|
||||
clap.parseParam("--tsconfig-override <STR> Specify custom tsconfig.json. Default <d>$cwd<r>/tsconfig.json") catch unreachable,
|
||||
clap.parseParam("-d, --define <STR>... Substitute K:V while parsing, e.g. --define process.env.NODE_ENV:\"development\". Values are parsed as JSON.") catch unreachable,
|
||||
clap.parseParam("--drop <STR>... Remove function calls, e.g. --drop=console removes all console.* calls.") catch unreachable,
|
||||
clap.parseParam("-l, --loader <STR>... Parse files with .ext:loader, e.g. --loader .js:jsx. Valid loaders: js, jsx, ts, tsx, json, toml, text, file, wasm, napi") catch unreachable,
|
||||
clap.parseParam("--no-macros Disable macros from being executed in the bundler, transpiler and runtime") catch unreachable,
|
||||
clap.parseParam("--jsx-factory <STR> Changes the function called when compiling JSX elements using the classic JSX runtime") catch unreachable,
|
||||
@@ -590,6 +591,8 @@ pub const Arguments = struct {
|
||||
};
|
||||
}
|
||||
|
||||
opts.drop = args.options("--drop");
|
||||
|
||||
const loader_tuple = try LoaderColonList.resolve(allocator, args.options("--loader"));
|
||||
|
||||
if (loader_tuple.keys.len > 0) {
|
||||
|
||||
Reference in New Issue
Block a user