Skip to content

Commit

Permalink
docs(config): add missing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
amr-crabnebula committed Oct 4, 2023
1 parent 2c2f93d commit bfacdce
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# cargo-packager

Rust executable packager, bundler and updater. A tool and library to generate installers or app bundles for your executables.
It also has a comptabile updater through [cargo-packager-updater](https://docs.rs/cargo-packager-updater).
It also has a comptabile updater through [cargo-packager-updater](./crates/updater/).

## CLI

Expand Down
3 changes: 3 additions & 0 deletions crates/config/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,16 +560,19 @@
"type": "string"
},
{
"description": "An object descriping the src file or directory and its target location in the final package.",
"type": "object",
"required": [
"src",
"target"
],
"properties": {
"src": {
"description": "The src file or directory, supports glob patterns.",
"type": "string"
},
"target": {
"description": "A relative path from the root of the final package.\n\nIf `src` is a glob, this will always be treated as a directory where all globbed files will be placed under.",
"type": "string"
}
}
Expand Down
11 changes: 11 additions & 0 deletions crates/config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT

//! Config types for [`cargo-packager`](https://docs.rs/cargo-packager).

#![deny(missing_docs)]

use std::{
collections::HashMap,
fmt::{self, Display},
Expand Down Expand Up @@ -628,8 +632,15 @@ pub struct Binary {
pub enum Resource {
/// Supports glob patterns
Single(String),
/// An object descriping the src file or directory
/// and its target location in the final package.
Mapped {
/// The src file or directory, supports glob patterns.
src: String,
/// A relative path from the root of the final package.
///
/// If `src` is a glob, this will always be treated as a directory
/// where all globbed files will be placed under.
target: PathBuf,
},
}
Expand Down
3 changes: 3 additions & 0 deletions crates/packager/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,16 +560,19 @@
"type": "string"
},
{
"description": "An object descriping the src file or directory and its target location in the final package.",
"type": "object",
"required": [
"src",
"target"
],
"properties": {
"src": {
"description": "The src file or directory, supports glob patterns.",
"type": "string"
},
"target": {
"description": "A relative path from the root of the final package.\n\nIf `src` is a glob, this will always be treated as a directory where all globbed files will be placed under.",
"type": "string"
}
}
Expand Down

0 comments on commit bfacdce

Please sign in to comment.