chore(): display package name correctly in docs

This commit is contained in:
Ibby 2017-03-20 20:14:51 -04:00
parent da109514ae
commit fe3e31d580
2 changed files with 5 additions and 4 deletions

View File

@ -12,9 +12,10 @@ module.exports = function npmId(renderDocsProcessor) {
}); });
docs.forEach(function(doc, i) { docs.forEach(function(doc, i) {
doc.npmId = doc.outputPath.replace('/README.md', '') doc.npmId = doc.outputPath.replace('/README.md', '') // for readmes
.replace('src/@ionic-native/plugins/','') .replace('@ionic-native/plugins/','') // for readmes
.replace('@ionic-native/plugins/',''); .replace('content/docs/v2/native/', '') // for docs
.replace('/index.md', ''); // for docs
}); });
// returning docs will replace docs object in the next process // returning docs will replace docs object in the next process

View File

@ -225,7 +225,7 @@ docType: "<$ doc.docType $>"
<@ endif @> <@ endif @>
<pre><code>$ <@ if prop.install @><$ prop.install $><@ else @>ionic plugin add <$ prop.plugin $><@ endif @> <pre><code>$ <@ if prop.install @><$ prop.install $><@ else @>ionic plugin add <$ prop.plugin $><@ endif @>
$ npm install --save @ionic-native/<$ prop.npmId $> $ npm install --save @ionic-native/<$ doc.npmId $>
</code></pre> </code></pre>
<p>Repo: <p>Repo:
<a href="<$ prop.repo $>"> <a href="<$ prop.repo $>">