[][src]Enum wasm_pack::command::Command

pub enum Command {
    Build(BuildOptions),
    Pack {
        path: Option<PathBuf>,
    },
    Publish {
        target: String,
        access: Option<Access>,
        path: Option<PathBuf>,
    },
    Login {
        registry: Option<String>,
        scope: Option<String>,
        always_auth: bool,
        auth_type: Option<String>,
    },
    Test(TestOptions),
}

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 of Pack

path: Option<PathBuf>

The path to the Rust crate.

Publish

πŸŽ† pack up your npm package and publish!

Fields of Publish

target: String

Sets the target environment. [possible values: browser, nodejs, no-modules]

access: Option<Access>

The access level for the package to be published

path: Option<PathBuf>

The path to the Rust crate.

Login

πŸ‘€ Add an npm 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.

Test(TestOptions)

πŸ‘©β€πŸ”¬ test your wasm!

Trait Implementations

impl Debug for Command[src]

impl StructOpt for Command[src]

default fn from_args() -> Self[src]

Gets the struct from the command line arguments. Print the error message and quit the program in case of failure. Read more

default fn from_iter<I>(iter: I) -> Self where
    I: IntoIterator,
    <I as IntoIterator>::Item: Into<OsString>,
    <I as IntoIterator>::Item: Clone
[src]

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

default 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]

Gets the struct from any iterator such as a Vec of your making. Read more

Auto Trait Implementations

impl Send for Command

impl Sync for Command

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T