mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
chore(): display package name correctly in docs
This commit is contained in:
parent
da109514ae
commit
fe3e31d580
@ -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
|
||||
|
2
scripts/docs/templates/common.template.html
vendored
2
scripts/docs/templates/common.template.html
vendored
@ -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 $>">
|
||||
|
Loading…
Reference in New Issue
Block a user