|
|
@ -4,7 +4,7 @@ pub mod access; |
|
|
|
use self::access::Access; |
|
|
|
use self::access::Access; |
|
|
|
use command::build::{Build, BuildOptions, Target}; |
|
|
|
use command::build::{Build, BuildOptions, Target}; |
|
|
|
use command::utils::{find_pkg_directory, get_crate_path}; |
|
|
|
use command::utils::{find_pkg_directory, get_crate_path}; |
|
|
|
use dialoguer::{Confirm, Input, Select}; |
|
|
|
use dialoguer::{Confirmation, Input, Select}; |
|
|
|
use failure::Error; |
|
|
|
use failure::Error; |
|
|
|
use log::info; |
|
|
|
use log::info; |
|
|
|
use npm; |
|
|
|
use npm; |
|
|
@ -31,8 +31,8 @@ pub fn publish( |
|
|
|
None => { |
|
|
|
None => { |
|
|
|
// while `wasm-pack publish`, if the pkg directory cannot be found,
|
|
|
|
// while `wasm-pack publish`, if the pkg directory cannot be found,
|
|
|
|
// then try to `wasm-pack build`
|
|
|
|
// then try to `wasm-pack build`
|
|
|
|
if Confirm::new() |
|
|
|
if Confirmation::new() |
|
|
|
.with_prompt("Your package hasn't been built, build it?") |
|
|
|
.with_text("Your package hasn't been built, build it?") |
|
|
|
.interact()? |
|
|
|
.interact()? |
|
|
|
{ |
|
|
|
{ |
|
|
|
let out_dir = Input::new() |
|
|
|
let out_dir = Input::new() |
|
|
|