Merge pull request #678 from rustwasm/ibaryshnikov-master

#640 minus changelog
master
ashley williams 6 years ago committed by GitHub
commit 1be5e91ce3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/command/build.rs
  2. 4
      src/command/mod.rs
  3. 4
      src/command/publish/mod.rs

@ -105,8 +105,8 @@ pub struct BuildOptions {
/// this flag will disable generating this TypeScript file.
pub disable_dts: bool,
#[structopt(long = "target", short = "t", default_value = "browser")]
/// Sets the target environment. [possible values: browser, nodejs, web, no-modules]
#[structopt(long = "target", short = "t", default_value = "bundler")]
/// Sets the target environment. [possible values: bundler, nodejs, web, no-modules]
pub target: Target,
#[structopt(long = "debug")]

@ -57,8 +57,8 @@ pub enum Command {
#[structopt(name = "publish")]
/// 🎆 pack up your npm package and publish!
Publish {
#[structopt(long = "target", short = "t", default_value = "browser")]
/// Sets the target environment. [possible values: browser, nodejs, no-modules]
#[structopt(long = "target", short = "t", default_value = "bundler")]
/// Sets the target environment. [possible values: bundler, nodejs, web, no-modules]
target: String,
/// The access level for the package to be published

@ -41,8 +41,8 @@ pub fn publish(
.interact()?;
let out_dir = format!("{}/pkg", out_dir);
let target = Select::new()
.with_prompt("target[default: browser]")
.items(&["browser", "nodejs", "no-modules"])
.with_prompt("target[default: bundler]")
.items(&["bundler", "nodejs", "web", "no-modules"])
.default(0)
.interact()?
.to_string();

Loading…
Cancel
Save