mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-04 00:13:06 +08:00
chore(dgeni): fixing npm install instructions
This commit is contained in:
parent
566cc08b1e
commit
da109514ae
@ -20,6 +20,7 @@ module.exports = function(currentVersion) {
|
||||
.processor(require('./processors/remove-private-members'))
|
||||
.processor(require('./processors/hide-private-api'))
|
||||
.processor(require('./processors/collect-inputs-outputs'))
|
||||
.processor(require('./processors/npm-id'))
|
||||
|
||||
// for debugging docs
|
||||
// .processor(function test(){
|
||||
|
@ -19,6 +19,7 @@ module.exports = function(currentVersion) {
|
||||
|
||||
// .processor(require('./processors/latest-version'))
|
||||
.processor(require('./processors/readmes'))
|
||||
.processor(require('./processors/npm-id'))
|
||||
.processor(require('./processors/remove-private-members'))
|
||||
.processor(require('./processors/hide-private-api'))
|
||||
// .processor(require('./processors/collect-inputs-outputs'))
|
||||
|
24
scripts/docs/processors/npm-id.js
Normal file
24
scripts/docs/processors/npm-id.js
Normal file
@ -0,0 +1,24 @@
|
||||
module.exports = function npmId(renderDocsProcessor) {
|
||||
return {
|
||||
name: 'npm-id',
|
||||
$runAfter: ['paths-computed'],
|
||||
$runBefore: ['rendering-docs'],
|
||||
$process: function(docs) {
|
||||
var currentVersion = renderDocsProcessor.extraData.version.current.name;
|
||||
|
||||
// pretty up and sort the docs object for menu generation
|
||||
docs = docs.filter(function(doc) {
|
||||
return (!!doc.name && !!doc.outputPath) || doc.docType === 'index-page';
|
||||
});
|
||||
|
||||
docs.forEach(function(doc, i) {
|
||||
doc.npmId = doc.outputPath.replace('/README.md', '')
|
||||
.replace('src/@ionic-native/plugins/','')
|
||||
.replace('@ionic-native/plugins/','');
|
||||
});
|
||||
|
||||
// returning docs will replace docs object in the next process
|
||||
return docs;
|
||||
}
|
||||
};
|
||||
};
|
@ -1,4 +1,4 @@
|
||||
module.exports = function jekyll(renderDocsProcessor) {
|
||||
module.exports = function readmes(renderDocsProcessor) {
|
||||
return {
|
||||
name: 'readmes',
|
||||
description: 'Create jekyll includes',
|
||||
@ -13,8 +13,6 @@ module.exports = function jekyll(renderDocsProcessor) {
|
||||
});
|
||||
|
||||
docs.forEach(function(doc, i) {
|
||||
doc.npmId = doc.outputPath.replace('/README.md', '')
|
||||
.replace('src/@ionic-native/plugins/','');
|
||||
doc.outputPath = doc.outputPath.replace('src/', '');
|
||||
});
|
||||
|
||||
|
5
scripts/docs/templates/common.template.html
vendored
5
scripts/docs/templates/common.template.html
vendored
@ -224,9 +224,8 @@ docType: "<$ doc.docType $>"
|
||||
</p>
|
||||
<@ endif @>
|
||||
|
||||
<pre><code>
|
||||
$ <@ if prop.install @><$ prop.install $><@ else @>ionic plugin add <$ prop.plugin $><@ endif @>
|
||||
$ npm install --save @ionic-native/<$ prop.pluginRef $>
|
||||
<pre><code>$ <@ if prop.install @><$ prop.install $><@ else @>ionic plugin add <$ prop.plugin $><@ endif @>
|
||||
$ npm install --save @ionic-native/<$ prop.npmId $>
|
||||
</code></pre>
|
||||
<p>Repo:
|
||||
<a href="<$ prop.repo $>">
|
||||
|
Loading…
Reference in New Issue
Block a user