-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview.ejs
More file actions
100 lines (97 loc) · 2.98 KB
/
view.ejs
File metadata and controls
100 lines (97 loc) · 2.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<article class="dependencies">
<header class="row package">
<h1 class="sixcol">
<a href="/package/<%= package.name %>"><%= package.name %></a> / <%= package.version %>
</h1>
<div class="sixcol last">
<% if (!stats.outofdate) { %>
<p class="status uptodate">
dependencies <span>up to date</span>
</p>
<% } else { %>
<p class="status outofdate">
dependencies <span>out of date</span>
</p>
<% } %>
</p>
</div>
<p class="twelvecol">
<%= package.description %>
</p>
</header>
<% if (shrinkwrap.length) { %>
<ul class="row summary">
<li class="threecol dependencies">
<strong><%= Object.keys(package.dependencies || {}).length %></strong>
Dependencies
</li>
<li class="threecol inherited">
<% var inherited = shrinkwrap.length - Object.keys(package.dependencies || {}).length %>
<strong><%= inherited %></strong>
Inherited dependencies
</li>
<li class="threecol uptodate boxed">
<strong><%= stats.uptodate %></strong>
up to date
</li>
<li class="threecol outofdate boxed last">
<strong><%= stats.outofdate %></strong>
out of date
</li>
</ul>
<section class="row">
<table class="details">
<thead>
<tr>
<th class="name">Dependency</th>
<th class="licenses">License</th>
<th class="version">Required</th>
<th class="version">Latest</th>
<th class="version">Installed</th>
<th class="status">status</th>
</tr>
</thead>
<tbody>
<% shrinkwrap.forEach(function (module) { %>
<% var classNames = [module.uptodate ? !module.pinned ? 'greedy' : 'uptodate' : 'outofdate', 'main']; %>
<tr class="<%= classNames.join(' ') %>">
<td class="name">
<a href="/package/<%= module.name %>"><%= module.name %></a>
</td>
<td class="licenses">
<% if (module.licenses) { %>
<%-
!(module.licenses || []).length ? 'Unknown' : module.licenses.map(function (license) {
var info = licenses(license);
return info && info.url
? '<a href="'+ info.url +'" title="'+ info.full +'" target="_blank">'+ license +'</a>'
: license;
}).join(', ')
%>
<% } else { %>
<strong>Unknown</strong>
<% } %>
</td>
<td class="version"><%= module.required %></td>
<td class="version"><%= module.latest %></td>
<td class="version"><%= module.version %></td>
<td class="status">
<% if (!module.uptodate) { %>
Out of date
<% } else if (!module.pinned) { %>
Greedy semver
<% } else { %>
Up to date
<% } %>
</td>
</tr>
<% }); %>
</tbody>
</table>
</section>
<% } else { %>
<section class="row">
<h2>No dependencies</h2>
</section>
<% } %>
</article>