Skip to content
This repository has been archived by the owner on Aug 15, 2018. It is now read-only.

改进在升级tnpm时spm doc命令失效问题 #1426

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ function generateCode(cwd, pkg) {
deps.forEach(function(dep) {
if (dep === pkg.name) return;
var rDep = dep;
if(~rDep.indexOf(pkg.name)){
rDep = './' + rDep.substr(pkg.name.length);
}
if (isRelative(rDep)) {
rDep = path.relative('./_site/', rDep);
if (rDep.charAt(0) !== '.') {
Expand Down
2 changes: 1 addition & 1 deletion lib/theme/templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{%- block afterstyle %}{% endblock %}
</head>
<body class="spmjs">
<script src="{{content_url('')}}dist/bundle.js?nowrap"></script>
<script src="../dist/bundle.js?nowrap"></script>

<div class="body-wrapper">
{%- block body %}
Expand Down