mirror of
https://github.com/SkyfallWasTaken/dinopkg.git
synced 2025-05-22 07:03:06 +00:00
WIP install command
This commit is contained in:
parent
32845b9006
commit
f59bb4def4
9 changed files with 44 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "dinopkg-package-json"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
@ -8,12 +8,12 @@ mod util;
|
|||
|
||||
#[serde_as]
|
||||
#[skip_serializing_none]
|
||||
#[derive(Serialize, Deserialize)]
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct PackageJson {
|
||||
pub name: String,
|
||||
pub version: String,
|
||||
pub author: Option<String>,
|
||||
pub author: Option<AuthorObjOrString>,
|
||||
#[serde(default = "default_as_false")]
|
||||
#[serde(skip_serializing_if = "is_false")]
|
||||
pub private: bool,
|
||||
|
@ -28,6 +28,13 @@ pub struct PackageJson {
|
|||
pub dev_dependencies: Option<Dependencies>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
#[serde(untagged)]
|
||||
pub enum AuthorObjOrString {
|
||||
Author { name: String, url: Option<String> },
|
||||
String(String),
|
||||
}
|
||||
|
||||
// serde :/
|
||||
#[allow(clippy::trivially_copy_pass_by_ref)]
|
||||
#[inline(always)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue