2
2
3
3
use bindgen;
4
4
use build;
5
- use command:: utils:: { set_crate_path , create_pkg_dir } ;
5
+ use command:: utils:: { create_pkg_dir , set_crate_path } ;
6
6
use emoji;
7
7
use error:: Error ;
8
8
use indicatif:: HumanDuration ;
@@ -35,7 +35,7 @@ pub enum BuildMode {
35
35
}
36
36
37
37
/// Everything required to configure and run the `wasm-pack build` command.
38
- #[ derive( Debug , StructOpt ) ]
38
+ #[ derive( Debug , StructOpt ) ]
39
39
pub struct BuildOptions {
40
40
/// The path to the Rust crate.
41
41
pub path : Option < String > ,
@@ -60,7 +60,6 @@ pub struct BuildOptions {
60
60
#[ structopt( long = "debug" ) ]
61
61
/// Build without --release.
62
62
debug : bool ,
63
-
64
63
// build config from manifest
65
64
// build_config: Option<BuildConfig>,
66
65
}
@@ -72,10 +71,10 @@ impl From<BuildOptions> for Build {
72
71
// let build_config = manifest::xxx(&crate_path).xxx();
73
72
Build {
74
73
crate_path,
75
- scope : build_opts. scope ,
76
- disable_dts : build_opts. disable_dts ,
77
- target : build_opts. target ,
78
- debug : build_opts. debug ,
74
+ scope : build_opts. scope ,
75
+ disable_dts : build_opts. disable_dts ,
76
+ target : build_opts. target ,
77
+ debug : build_opts. debug ,
79
78
// build_config,
80
79
crate_name,
81
80
}
@@ -85,7 +84,7 @@ impl From<BuildOptions> for Build {
85
84
type BuildStep = fn ( & mut Build , & Step , & Logger ) -> Result < ( ) , Error > ;
86
85
87
86
impl Build {
88
- /// Execute this `Init ` command.
87
+ /// Execute this `Build ` command.
89
88
pub fn run ( & mut self , log : & Logger , mode : BuildMode ) -> Result < ( ) , Error > {
90
89
let process_steps = Build :: get_process_steps ( mode) ;
91
90
@@ -148,7 +147,6 @@ impl Build {
148
147
}
149
148
}
150
149
151
-
152
150
fn step_check_crate_config ( & mut self , step : & Step , log : & Logger ) -> Result < ( ) , Error > {
153
151
info ! ( & log, "Checking crate configuration..." ) ;
154
152
manifest:: check_crate_config ( & self . crate_path , step) ?;
0 commit comments