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) {
doc.npmId = doc.outputPath.replace('/README.md', '')
.replace('src/@ionic-native/plugins/','')
.replace('@ionic-native/plugins/','');
doc.npmId = doc.outputPath.replace('/README.md', '') // for readmes
.replace('@ionic-native/plugins/','') // for readmes
.replace('content/docs/v2/native/', '') // for docs
.replace('/index.md', ''); // for docs
});
// returning docs will replace docs object in the next process

View File

@ -225,7 +225,7 @@ docType: "<$ doc.docType $>"
<@ 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>
<p>Repo:
<a href="<$ prop.repo $>">