1
1
#![ allow( missing_docs) ] // Prevents double-documenting some things
2
2
3
3
use crate :: PERSEUS_VERSION ;
4
- use clap:: { AppSettings , Clap } ;
4
+ use clap:: { AppSettings , Parser } ;
5
5
6
6
// The documentation for the `Opts` struct will appear in the help page, hence the lack of puncutation and the lowercasing in places
7
7
8
8
/// The command-line interface for Perseus, a super-fast WebAssembly frontend development framework!
9
- #[ derive( Clap ) ]
9
+ #[ derive( Parser ) ]
10
10
#[ clap( version = PERSEUS_VERSION ) ]
11
- #[ clap( setting = AppSettings :: ColoredHelp ) ]
11
+ // #[clap(setting = AppSettings::ColoredHelp)]
12
12
pub struct Opts {
13
13
#[ clap( subcommand) ]
14
14
pub subcmd : Subcommand ,
15
15
}
16
16
17
- #[ derive( Clap ) ]
17
+ #[ derive( Parser ) ]
18
18
pub enum Subcommand {
19
19
Build ( BuildOpts ) ,
20
20
Export ( ExportOpts ) ,
@@ -30,21 +30,21 @@ pub enum Subcommand {
30
30
Tinker ( TinkerOpts ) ,
31
31
}
32
32
/// Builds your app
33
- #[ derive( Clap ) ]
33
+ #[ derive( Parser ) ]
34
34
pub struct BuildOpts {
35
35
/// Build for production
36
36
#[ clap( long) ]
37
37
pub release : bool ,
38
38
}
39
39
/// Exports your app to purely static files
40
- #[ derive( Clap ) ]
40
+ #[ derive( Parser ) ]
41
41
pub struct ExportOpts {
42
42
/// Export for production
43
43
#[ clap( long) ]
44
44
pub release : bool ,
45
45
}
46
46
/// Serves your app (set the `$HOST` and `$PORT` environment variables to change the location it's served at)
47
- #[ derive( Clap ) ]
47
+ #[ derive( Parser ) ]
48
48
pub struct ServeOpts {
49
49
/// Don't run the final binary, but print its location instead as the last line of output
50
50
#[ clap( long) ]
@@ -57,7 +57,7 @@ pub struct ServeOpts {
57
57
pub release : bool ,
58
58
}
59
59
/// Removes `.perseus/` entirely for updates or to fix corruptions
60
- #[ derive( Clap ) ]
60
+ #[ derive( Parser ) ]
61
61
pub struct CleanOpts {
62
62
/// Only remove the `.perseus/dist/` folder (use if you've ejected)
63
63
#[ clap( short, long) ]
@@ -67,7 +67,7 @@ pub struct CleanOpts {
67
67
pub force : bool ,
68
68
}
69
69
/// Packages your app for deployment
70
- #[ derive( Clap ) ]
70
+ #[ derive( Parser ) ]
71
71
pub struct DeployOpts {
72
72
/// Change the output from `pkg/` to somewhere else
73
73
#[ clap( short, long, default_value = "pkg" ) ]
@@ -77,7 +77,7 @@ pub struct DeployOpts {
77
77
pub export_static : bool ,
78
78
}
79
79
/// Runs the `tinker` action of plugins, which lets them modify the Perseus engine
80
- #[ derive( Clap ) ]
80
+ #[ derive( Parser ) ]
81
81
pub struct TinkerOpts {
82
82
/// Don't remove and recreate the `.perseus/` directory
83
83
#[ clap( long) ]
0 commit comments