mirror of
https://github.com/sharkdp/bat.git
synced 2025-02-21 20:38:44 +00:00
Cargo.toml: Introduce 'quick-build-application' feature
Use it like this: cargo build --no-default-features --features quick-build-application It reduces dependencies to build from 154 to 125, allowing quicker iteration when developing the app.
This commit is contained in:
parent
905902d811
commit
cb4973987b
7
.github/workflows/CICD.yml
vendored
7
.github/workflows/CICD.yml
vendored
@ -246,6 +246,13 @@ jobs:
|
|||||||
command: check
|
command: check
|
||||||
args: --locked --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,git,paging
|
args: --locked --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,git,paging
|
||||||
|
|
||||||
|
- name: "Feature check: quick-build-application"
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
use-cross: ${{ matrix.job.use-cross }}
|
||||||
|
command: check
|
||||||
|
args: --locked --target=${{ matrix.job.target }} --verbose --no-default-features --features quick-build-application
|
||||||
|
|
||||||
- name: Create tarball
|
- name: Create tarball
|
||||||
id: package
|
id: package
|
||||||
shell: bash
|
shell: bash
|
||||||
|
18
Cargo.toml
18
Cargo.toml
@ -12,10 +12,11 @@ build = "build.rs"
|
|||||||
edition = '2018'
|
edition = '2018'
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["application"]
|
default = ["full-application"]
|
||||||
# Feature required for bat the application. Should be disabled when depending on
|
# Feature required for bat the application. Should be disabled when depending on
|
||||||
# bat as a library.
|
# bat as a library.
|
||||||
application = [
|
full-application = [
|
||||||
|
"application",
|
||||||
"atty",
|
"atty",
|
||||||
"bugreport",
|
"bugreport",
|
||||||
"clap",
|
"clap",
|
||||||
@ -26,6 +27,19 @@ application = [
|
|||||||
"regex-onig",
|
"regex-onig",
|
||||||
"wild",
|
"wild",
|
||||||
]
|
]
|
||||||
|
# Mainly for developers that want to iterate quickly
|
||||||
|
# Be aware that the included features might change in the future
|
||||||
|
quick-build-application = [
|
||||||
|
"application",
|
||||||
|
"atty",
|
||||||
|
"clap",
|
||||||
|
"dirs-next",
|
||||||
|
"lazy_static",
|
||||||
|
"paging",
|
||||||
|
"regex-onig",
|
||||||
|
"wild",
|
||||||
|
]
|
||||||
|
application = []
|
||||||
git = ["git2"] # Support indicating git modifications
|
git = ["git2"] # Support indicating git modifications
|
||||||
paging = ["shell-words"] # Support applying a pager on the output
|
paging = ["shell-words"] # Support applying a pager on the output
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user