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

pub enum Command {
    Build(BuildOptions),
    Pack {
        path: Option<PathBuf>,
    },
    Generate {
        name: String,
        template: String,
        mode: InstallMode,
    },
    Publish {
        target: String,
        access: Option<Access>,
        tag: Option<String>,
        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 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. If not set, searches up the path from the current dirctory.

Generate

πŸ‘ create a new project with a template

Fields of Generate

name: String

The name of the project

template: String

The URL to the template

mode: InstallMode

Should we install or check the presence of binary tools. [possible values: no-install, normal, force]

Publish

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

Fields of Publish

target: String

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

access: Option<Access>

The access level for the package to be published

tag: Option<String>

The distribution tag being used for publishing. See https://docs.npmjs.com/cli/dist-tag

path: Option<PathBuf>

The path to the Rust crate. If not set, searches up the path from the current dirctory.

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 your wasm!

Trait Implementations

impl Debug for Command[src]

impl StructOpt for Command[src]

Auto Trait Implementations

impl RefUnwindSafe for Command

impl Send for Command

impl Sync for Command

impl Unpin for Command

impl UnwindSafe for Command

Blanket Implementations

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

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

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

impl<T> Erased for T

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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, U> TryInto<U> for T where
    U: TryFrom<T>, 

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