You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Add a new entry in the `define_package_managers!` macro in [package_manager.rs](https://raw.githubusercontent.com/o2sh/onefetch/master/src/deps/package_manager.rs).
113
+
114
+
**Example**:
115
+
116
+
`{ Cargo, "cargo", "Cargo.toml", cargo },`
117
+
118
+
The first item `Cargo` corresponds to the name of the package manager. The second item `cargo` is the display name. Then we have the name of the package manager file that will be parsed: `Cargo.toml`. The last item `cargo` corresponds to the function mame responsible for parsing the package manager file, cf. step 2.
119
+
120
+
2. in `src/onefetch/deps/package_parser.rs`, add a function that should take in a `string` as the content of the package manager file, and return `usize` as the number of dependencies.
130
121
131
-
3. in `src/onefetch/deps/package_parser.rs`, add a function whose name corresponds to your manager. This function should take in a `string` as the contents of the package manager file, and return `usize` as the number of dependencies. You should also make sure you catch any edge cases, such as the absence of a `dependencies` field.
In order to make Onefetch more accessible for non English-speakers, we are seeking the help of multilingual contributors willing to translate the README.md in their native tongue.
0 commit comments