Skip to content

Commit aed12bc

Browse files
committed
fix: 🚑️ upgraded clap to fix compile errors
1 parent 04aa228 commit aed12bc

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

packages/perseus-cli/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ indicatif = "0.17.0-beta.1" # Not stable, but otherwise error handling is just a
2727
console = "0.14"
2828
serde = "1"
2929
serde_json = "1"
30-
clap = "3.0.0-beta.4"
30+
clap = { version = "3.0.0-beta.5", features = ["color"] }
3131
fs_extra = "1"
3232

3333
[lib]

packages/perseus-cli/src/bin/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use clap::Clap;
1+
use clap::Parser;
22
use fmterr::fmt_err;
33
use perseus_cli::errors::*;
44
use perseus_cli::{

packages/perseus-cli/src/parse.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
#![allow(missing_docs)] // Prevents double-documenting some things
22

33
use crate::PERSEUS_VERSION;
4-
use clap::{AppSettings, Clap};
4+
use clap::{AppSettings, Parser};
55

66
// The documentation for the `Opts` struct will appear in the help page, hence the lack of puncutation and the lowercasing in places
77

88
/// The command-line interface for Perseus, a super-fast WebAssembly frontend development framework!
9-
#[derive(Clap)]
9+
#[derive(Parser)]
1010
#[clap(version = PERSEUS_VERSION)]
11-
#[clap(setting = AppSettings::ColoredHelp)]
11+
// #[clap(setting = AppSettings::ColoredHelp)]
1212
pub struct Opts {
1313
#[clap(subcommand)]
1414
pub subcmd: Subcommand,
1515
}
1616

17-
#[derive(Clap)]
17+
#[derive(Parser)]
1818
pub enum Subcommand {
1919
Build(BuildOpts),
2020
Export(ExportOpts),
@@ -30,21 +30,21 @@ pub enum Subcommand {
3030
Tinker(TinkerOpts),
3131
}
3232
/// Builds your app
33-
#[derive(Clap)]
33+
#[derive(Parser)]
3434
pub struct BuildOpts {
3535
/// Build for production
3636
#[clap(long)]
3737
pub release: bool,
3838
}
3939
/// Exports your app to purely static files
40-
#[derive(Clap)]
40+
#[derive(Parser)]
4141
pub struct ExportOpts {
4242
/// Export for production
4343
#[clap(long)]
4444
pub release: bool,
4545
}
4646
/// Serves your app (set the `$HOST` and `$PORT` environment variables to change the location it's served at)
47-
#[derive(Clap)]
47+
#[derive(Parser)]
4848
pub struct ServeOpts {
4949
/// Don't run the final binary, but print its location instead as the last line of output
5050
#[clap(long)]
@@ -57,7 +57,7 @@ pub struct ServeOpts {
5757
pub release: bool,
5858
}
5959
/// Removes `.perseus/` entirely for updates or to fix corruptions
60-
#[derive(Clap)]
60+
#[derive(Parser)]
6161
pub struct CleanOpts {
6262
/// Only remove the `.perseus/dist/` folder (use if you've ejected)
6363
#[clap(short, long)]
@@ -67,7 +67,7 @@ pub struct CleanOpts {
6767
pub force: bool,
6868
}
6969
/// Packages your app for deployment
70-
#[derive(Clap)]
70+
#[derive(Parser)]
7171
pub struct DeployOpts {
7272
/// Change the output from `pkg/` to somewhere else
7373
#[clap(short, long, default_value = "pkg")]
@@ -77,7 +77,7 @@ pub struct DeployOpts {
7777
pub export_static: bool,
7878
}
7979
/// Runs the `tinker` action of plugins, which lets them modify the Perseus engine
80-
#[derive(Clap)]
80+
#[derive(Parser)]
8181
pub struct TinkerOpts {
8282
/// Don't remove and recreate the `.perseus/` directory
8383
#[clap(long)]

0 commit comments

Comments
 (0)