Skip to content

Commit

Permalink
Merge pull request #74 from rust-practice/simplify-add-new-type
Browse files Browse the repository at this point in the history
Simplify-add-new-type
  • Loading branch information
pawarherschel authored Feb 2, 2024
2 parents 2911c04 + 96afebd commit 4b7c053
Show file tree
Hide file tree
Showing 3 changed files with 209 additions and 129 deletions.
33 changes: 17 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
[package]
name = "cargo-leet"
description = "Utility program to help with working on leetcode locally"
repository = "https://github.com/rust-practice/cargo-leet"
version = "0.2.0"
authors = ["Members of Rust Practice Discord Server"]
readme = "README.md"
license = "MIT OR Apache-2.0"
edition = "2021"
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/rust-practice/cargo-leet"
description = "Utility program to help with working on leetcode locally"

[dependencies]
anyhow = { version = "1.0.71", optional = true }
clap = { version = "4.3.3", features = ["derive", "cargo"], optional = true }
convert_case = { version = "0.6", optional = true }
env_logger = { version = "0.11", optional = true }
log = { version = "0.4.18", optional = true }
regex = { version = "1.8.4", optional = true }
serde_flat_path = { version = "0.1.2", optional = true }
clap = { version = "4.3.3", features = ["derive", "cargo"], optional = true }
serde = { version = "1.0.164", features = ["derive"], optional = true }
serde_flat_path = { version = "0.1.2", optional = true }
strum = { version = "0.26", features = ["derive"], optional = true }
ureq = { version = "2.6", features = ["json"], optional = true }
strum = { version = "0.26", features = ["derive"] }

[[bin]]
name = "cargo-leet"
Expand All @@ -31,13 +31,14 @@ default = ["leet_env"]
leet_env = []
# Items used when running as a binary
tool = [
"anyhow",
"convert_case",
"env_logger",
"log",
"regex",
"serde_flat_path",
"clap",
"serde",
"ureq",
"anyhow",
"clap",
"convert_case",
"env_logger",
"log",
"regex",
"serde_flat_path",
"serde",
"strum",
"ureq",
]
83 changes: 83 additions & 0 deletions bacon.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# This is a configuration file for the bacon tool
#
# Bacon repository: https://github.com/Canop/bacon
# Complete help on configuration: https://dystroy.org/bacon/config/
# You can also check bacon's own bacon.toml file
# as an example: https://github.com/Canop/bacon/blob/main/bacon.toml

default_job = "clippy"

[jobs.check]
command = ["cargo", "check", "--all-features", "--color", "always"]
need_stdout = false

[jobs.check-all]
command = ["cargo", "check", "--all-targets", "--color", "always"]
need_stdout = false

[jobs.clippy]
command = ["cargo", "clippy", "--all-targets", "--all-features", "--color", "always"]
need_stdout = false

# This job lets you run
# - all tests: bacon test
# - a specific test: bacon test -- config::test_default_files
# - the tests of a package: bacon test -- -- -p config
[jobs.test]
command = [
"cargo",
"test",
"--all-features",
"--color",
"always",
"--",
"--color",
"always", # see https://github.com/Canop/bacon/issues/124
]
need_stdout = true

[jobs.doc]
command = ["cargo", "doc", "--color", "always", "--no-deps"]
need_stdout = false

# If the doc compiles, then it opens in your browser and bacon switches
# to the previous job
[jobs.doc-open]
command = ["cargo", "doc", "--color", "always", "--no-deps", "--open"]
need_stdout = false
on_success = "back" # so that we don't open the browser at each change

# You can run your application and have the result displayed in bacon,
# *if* it makes sense for this crate.
# Don't forget the `--color always` part or the errors won't be
# properly parsed.
# If your program never stops (eg a server), you may set `background`
# to false to have the cargo run output immediately displayed instead
# of waiting for program's end.
# [jobs.run]
# command = [
# "cargo",
# "run",
# "--color",
# "always",
# # put launch parameters for your program behind a `--` separator
# ]
# need_stdout = true
# allow_warnings = true
# background = true

# This parameterized job runs the example of your choice, as soon
# as the code compiles.
# Call it as
# bacon ex -- my-example
# [jobs.ex]
# command = ["cargo", "run", "--color", "always", "--example"]
# need_stdout = true
# allow_warnings = true

# You may define here keybindings that would be specific to
# a project, for example a shortcut to launch a specific job.
# Shortcuts to internal functions (scrolling, toggling, etc.)
# should go in your personal global prefs.toml file instead.
[keybindings]
# alt-m = "job:my-job"
Loading

0 comments on commit 4b7c053

Please sign in to comment.