pub enum Command {
Build(BuildOptions),
Pack {
pkg_directory: PathBuf,
path: Option<PathBuf>,
},
Generate {
name: String,
template: String,
mode: InstallMode,
},
Publish {
target: String,
access: Option<Access>,
tag: Option<String>,
pkg_directory: PathBuf,
path: Option<PathBuf>,
},
Login {
registry: Option<String>,
scope: Option<String>,
auth_type: Option<String>,
},
Test(TestOptions),
}Expand description
The various kinds of commands that wasm-pack can execute.
Variantsยง
Build(BuildOptions)
๐๏ธ build your npm package!
Pack
๐ฑ create a tar of your npm package but donโt publish!
Fields
Generate
๐ create a new project with a template
Fields
ยง
mode: InstallModeShould we install or check the presence of binary tools. [possible values: no-install, normal, force]
Publish
๐ pack up your npm package and publish!
Fields
Login
๐ค Add an npm registry user account! (aliases: adduser, add-user)
Fields
ยง
registry: Option<String>Default: โhttps://registry.npmjs.org/โ. The base URL of the npm package registry. If scope is also specified, this registry will only be used for packages with that scope. scope defaults to the scope of the project directory youโre currently in, if any.
Test(TestOptions)
๐ฉโ๐ฌ test your wasm!
Trait Implementationsยง
Sourceยงimpl FromArgMatches for Command
impl FromArgMatches for Command
Sourceยงfn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Sourceยงfn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Sourceยงfn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Sourceยงfn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Sourceยงimpl Subcommand for Command
impl Subcommand for Command
Sourceยงfn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Sourceยงfn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Append to
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSourceยงfn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Test whether
Self can parse a specific subcommandAuto Trait Implementationsยง
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more