Skip to content

Commit

Permalink
Add cargo support
Browse files Browse the repository at this point in the history
  • Loading branch information
BrainMaestro committed Mar 17, 2017
1 parent 4097ac2 commit 9735e00
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
![](screenshot.png)

### Package Manager Support
- [x] Npm.
- [x] Npm/Yarn.
- [x] Composer.
- [x] Pip.
- [ ] Cargo.
- [ ] Yarn.
- [x] Cargo.
- [ ] Gem

### Rationale
Why build this? We already have [npmhub](https://github.com/npmhub/npmhub)?
Expand Down
7 changes: 7 additions & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,12 @@ window.packageConfig = [
registry: 'pypi',
parse: window.parser.toml,
keys: ['packages', 'dev-packages'],
},
{
name: 'cargo',
file: 'Cargo.toml',
registry: 'cargo',
parse: window.parser.toml,
keys: ['dependencies', 'dev-dependencies'],
}
];
3 changes: 3 additions & 0 deletions src/display.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@
function addVersion(row, version) {
var td = document.createElement('td');
var code = document.createElement('code');
if (typeof version === 'object') {
version = version.version || version.path || '-';
}
code.textContent = version;
td.appendChild(code);
row.appendChild(td);
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Package Hub",
"version": "0.5.0",
"version": "0.6.0",
"manifest_version": 2,
"description": "Display dependencies for many package managers on GitHub",
"author": "Ezinwa Okpoechi",
Expand Down

0 comments on commit 9735e00

Please sign in to comment.