-
Notifications
You must be signed in to change notification settings - Fork 422
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(manifest): refactor npm package into own mod
- Loading branch information
1 parent
5304a49
commit 33eccd3
Showing
2 changed files
with
28 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#[derive(Serialize)] | ||
pub struct NpmPackage { | ||
pub name: String, | ||
#[serde(skip_serializing_if = "Vec::is_empty")] | ||
pub collaborators: Vec<String>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub description: Option<String>, | ||
pub version: String, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub license: Option<String>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub repository: Option<Repository>, | ||
#[serde(skip_serializing_if = "Vec::is_empty")] | ||
pub files: Vec<String>, | ||
pub main: String, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub types: Option<String>, | ||
} | ||
|
||
#[derive(Serialize)] | ||
pub struct Repository { | ||
#[serde(rename = "type")] | ||
pub ty: String, | ||
pub url: String, | ||
} |