Enum wasm_pack::command::Command [−][src]
pub enum Command { Init { path: Option<String>, scope: Option<String>, mode: String, disable_dts: bool, target: String, debug: bool, }, Pack { path: Option<String>, }, Publish { path: Option<String>, }, Login { registry: Option<String>, scope: Option<String>, always_auth: bool, auth_type: Option<String>, }, }
The various kinds of commands that wasm-pack
can execute.
Variants
Init
🐣 initialize a package.json based on your compiled wasm!
Fields of Init
path: Option<String> | The path to the Rust crate. |
scope: Option<String> | The npm scope to use in package.json, if any. |
mode: String | Sets steps to be run. [possible values: no-build, no-install, normal] |
disable_dts: bool | By default a *.d.ts file is generated for the generated JS file, but this flag will disable generating this TypeScript file. |
target: String | Sets the target environment. [possible values: browser, nodejs] |
debug: bool | Build without --release. |
Pack
🍱 create a tar of your npm package but don't publish!
Fields of Pack
path: Option<String> | The path to the Rust crate. |
Publish
🎆 pack up your npm package and publish!
Fields of Publish
path: Option<String> | The path to the Rust crate. |
Login
👤 Add a registry user account! (aliases: adduser, add-user)
Fields of Login
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. |
scope: Option<String> | Default: none. If specified, the user and login credentials given will be associated with the specified scope. |
always_auth: bool | If specified, save configuration indicating that all requests to the given registry should include authorization information. Useful for private registries. Can be used with --registry and / or --scope |
auth_type: Option<String> | Default: 'legacy'. Type: 'legacy', 'sso', 'saml', 'oauth'. What authentication strategy to use with adduser/login. Some npm registries (for example, npmE) might support alternative auth strategies besides classic username/password entry in legacy npm. |
Trait Implementations
impl Debug for Command
[src]
impl Debug for Command
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl StructOpt for Command
[src]
impl StructOpt for Command
fn clap<'a, 'b>() -> App<'a, 'b>
[src]
fn clap<'a, 'b>() -> App<'a, 'b>
Returns the corresponding clap::App
.
fn from_clap(matches: &ArgMatches) -> Self
[src]
fn from_clap(matches: &ArgMatches) -> Self
Creates the struct from clap::ArgMatches
. It cannot fail with a parameter generated by clap
by construction. Read more
fn from_args() -> Self
[src]
fn from_args() -> Self
Gets the struct from the command line arguments. Print the error message and quit the program in case of failure. Read more
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
[src]
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
Gets the struct from any iterator such as a Vec
of your making. Print the error message and quit the program in case of failure. Read more
fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
[src]
fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
Gets the struct from any iterator such as a Vec
of your making. Read more